summaryrefslogtreecommitdiff
path: root/TAO/tests/Cubit/Orbix/orb.mk
blob: cf7b12d3b1b8861cdb3aedf271798163204eb47a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# ------------------------------------------------------------
# Orbix 2.2 implicit rules for SunOS/GNU Make
# ------------------------------------------------------------
#
# If you cut'n'paste this into your /usr/include/make/default.mk
# file, beware! This is not officially supported by Iona
# Technologies, and you may want to be a bit of a Makefile hacker
# to make it integrate well with your site's setup.

# The best thing to do would be put it in a standard place and
# anyone who wants the Orbix implicit rule set can include
# it with an "include <pathname>/orbix.mk" line in their
# Makefile. A good place to put it might be /usr/include/make.

# These rules define default C++, C++FLAGS and C++SUFFIX.
# C++ is the C++ compiler to use; C++FLAGS are command-line
# flags to the C++ compiler for use in compiling C++ source
# files into objects; C++SUFFIX is the filename suffix
# indicating C++ source. By default, it's set to "C" for AT&T C++,
# and "cc" for GNU g++.

# Feel free to override these in your Makefiles *after*
# including this file.

# IMPORTANT: If the -M switch is specified in IDLFLAGS, the IDL
# compiler appends to the user-specified file. The dependency for
# specified_file.o in the linking target should appear _after_ any use
# of the IDL compiler which takes the -M flag.  Putting it _last_
# is normally the best approach.

# Note that these rule definitions use pattern matching,
# and therefore only work with SunOS make and GNU make.

# They may not work with other vendor's versions of make.
# If they do not, you may wish to try using GNU make, which
# is free software produced by the Free Software Foundation.

# If the version of make you wish to use does not support
# pattern matching, use the sample explicit rule set in
# the comments at the end of this file.

# ------------------------------------------------------------
# Essential: set these to the locations into which you
#		have installed Orbix' components:

ORBIX_BINDIR    = /opt/Orbix_2.2MT/corba2/bin
ORBIX_LIBDIR    = /opt/Orbix_2.2MT/corba2/lib
ORBIX_INCDIR    = /opt/Orbix_2.2MT/corba2/include

#-------------------------------------------------------------
# To compile the demos, you should change these values as
# appropriate for your particular system installation
#-------------------------------------------------------------

X11BASE         = /usr/openwin
X11INCDIR       = $(X11BASE)/include
X11LIBDIR       = $(X11BASE)/lib

# C++             = CC
# C++FLAGS        = -I$(ORBIX_INCDIR) -I. -mt -D_REENTRANT
# C++SUFFIX       = cpp

# ------------------------------------------------------------
# ITCLT, IRCLT and ITSRV can be either statically or dynamically linked
# Use -Bdynamic or -Bstatic as appropriate.
# ------------------------------------------------------------

ITCLT 		= -Bstatic -lorbixmt
IRCLT 		= -Bstatic -lIRcltmt
ITSRV 		= -Bstatic -lorbixmt
ITIIOP          = -Bstatic -liiopmt
ITDSI           = -Bstatic -lDSImt
ITIFR		= -Bstatic -lifrmt

# ------------------------------------------------------------
# SYSLIBS must be dynamically linked; otherwise you can expect to
# get linkage errors for symbols in the nsl library
# ------------------------------------------------------------

LDFLAGS         += -L$(ORBIX_LIBDIR)
SYSLIBS         = -Bdynamic -lnsl -lsocket

IDL             = $(ORBIX_BINDIR)/idl 
IDLFLAGS        =

# ------------------------------------------------------------
# The following section defines implicit rules for creating
# *.{C,S}.C files, rules for compiling those
# into objects, and even a rule for compiling C++ source into
# objects (in case one isn't already defined).

# ------------------------------------------------------------
# first, put the new suffixes at the *head* of the suffix list,
# overriding any existing .C compilation method.
.SUFFIXES:
.SUFFIXES: .$(C++SUFFIX) .idl $(SUFFIXES)

# .SUFFIXES: .$(C++SUFFIX) .idl .hh $(SUFFIXES)
# ------------------------------------------------------------
# *[CS].o must be compiled here, and depends
# mostly on the C++ files produced from the IDL file.

%C.o: %C.$(C++SUFFIX)
	$(C++) -c $(C++FLAGS) $<

%S.o: %S.$(C++SUFFIX)
	$(C++) -c $(C++FLAGS) $<

%.o: %.$(C++SUFFIX)
	$(C++) -c $(C++FLAGS) $<

# and here's how to compile C++ files from the IDL file.
# only ONE of these rules will be run at make-time,

%S.$(C++SUFFIX): %.idl
	$(IDL) $(IDLFLAGS) $<

%C.$(C++SUFFIX): %.idl
	$(IDL) $(IDLFLAGS) $<

%.hh: %.idl
	$(IDL) $(IDLFLAGS) $<

# ------------------------------------------------------------
# If the version of make you wish to use does not support
# pattern matching, here's a sample of an explicit rule set.

# We assume the IDL file is called "foobar.idl", we wish
# to compile "foobarC.o", "foobarS.o", and
# "foobar.hh", and the C++ file suffix.
# ------------------------------------------------------------

# foobarC.o: foobar.hh foobarC.C
#	$(C++) -c ($C++FLAGS) foobarC.C
#
# foobarS.o: foobar.hh foobarS.C
#	$(C++) -c ($C++FLAGS) foobarS.C
#
# foobarC.C: foobar.idl
#	$(IDL) -c ($IDLFLAGS) foobar.idl
#
# foobarS.C: foobar.idl
#	$(IDL) -c ($IDLFLAGS) foobar.idl
#
# foobar.hh: foobar.idl
#	$(IDL) -c ($IDLFLAGS) foobar.idl