summaryrefslogtreecommitdiff
path: root/performance-tests/TTCP/Orbix/orbix_defaults.mk
blob: 9a3e83f5fe3fef4c6570f81dcafbebeafb78ad5e (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

# 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    = $(ORBIX_ROOT)/bin
ORBIX_LIBDIR    = $(ORBIX_ROOT)/lib
ORBIX_INCDIR    = $(ORBIX_ROOT)/include

C++             = CC
C++FLAGS 	= -I$(ORBIX_INCDIR)
C++SUFFIX       = cpp

LDFLAGS         = -L$(ORBIX_LIBDIR) -R $(ORBIX_LIBDIR) -lnsl -lsocket

IDL             = $(ORBIX_BINDIR)/idl 

IDLFLAGS =


# ------------------------------------------------------------
# The following section defines implicit rules for creating
# *.{client,server}.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) $<