summaryrefslogtreecommitdiff
path: root/include/makeinclude/wrapper_macros.GNU
blob: 767fefa6d0be36f7173bf93e529475fac34f1578 (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
#----------------------------------------------------------------------------
#	$Id$
#----------------------------------------------------------------------------
# 
# Please see the README file in this directory to get a complete listing
# of all the platform compilation macros that may be defined to port ACE.

#	The following describes the ACE wrapper macros
#
#	Variable	Description
#	--------	-----------
#	ARFLAGS		Flags for the archive utility (ar)
#	CC		C compiler command
#	CXX		C++ compiler command
#	COMPILE.c	Flags for compiling with C
#	COMPILE.cc	Flags for compiling with C++
#	CPPFLAGS	C pre-processor flags
#	CFLAGS		C compilation flags
#	CCFLAGS		C++ compilation flags
#	DCFLAGS		C compilation flags for debugging
#	DCCFLAGS	C++ compilation flags for debugging
#	DEFFLAGS	C++ preprocessor flag for defining symbols 
#	DLD		Name of dynamic linker
#	LD		Name of linker
#	IDL		Name of the CORBA IDL compiler
#	INSBIN		Binary (executable) installation directory
#	INSINC		Include file installation directory
#	INSMAN		Manpage installation directory
#	INSLIB		Library installation directory
#	LDFLAGS		ld linker flags
#	LINK.c		Flags for linking with C
#	LINK.cc		Flags for linking with C++
#	LINE_COMMAND	A hook for passing commands to the linker, e.g., for Quantify
#	MAKEFLAGS	Flags that are passed into the compilation from the commandline
#	OCFLAGS		Optimizing C compilation flags
#	OCCFLAGS	Optimizing C++ compilation flags
#	ORBIX_ROOT	Root of IONA's Orbix CORBA implementation
#	PCFLAGS		C compilation flags for profiling
#	PCCFLAGS	C++ compilation flags for profiling
#	PTDIRS		Pathnames of directories containing template code
#	RM		Name of program to use to remove files
#	SOFLAGS		Flags used to build a shared library
#	SOBUILD		Link line necessary to build a share library
#	VAR		Variant identifier suffix
#	VDIR		Directory for object code
#	VSHDIR		Directory for shared object code
#	WRAPPER_ROOT	Pathname for the root of the build tree
#
#----------------------------------------------------------------------------
#	Platform-dependent macro definitions 
#       (link to the appropriate platform-specific config file).
#----------------------------------------------------------------------------

include $(WRAPPER_ROOT)/include/makeinclude/platform_macros.GNU

#----------------------------------------------------------------------------
#	Platform-independent macro definitions
#----------------------------------------------------------------------------

CPPFLAGS	+= $(DEFFLAGS) $(INCLDIRS)
DCFLAGS		+= -g 
DCCFLAGS	+= -g 
IDL		= idl
IDLFLAGS	= -s S.cpp -c C.cpp
INCLDIRS	+= -I$(WRAPPER_ROOT) -I.
INSBIN		= $(WRAPPER_ROOT)/bin
INSINC		= $(WRAPPER_ROOT)/ace
INSLIB		= $(WRAPPER_ROOT)/ace
INSMAN		= $(WRAPPER_ROOT)/man
LDFLAGS		+= -L$(WRAPPER_ROOT)/ace -L./
LEX		= flex
# LINK_COMMAND = quantify -cache-dir=/tmp/quantify
OCFLAGS		+= -O
OCCFLAGS	+= -O
PCFLAGS		+= # -p
PCCFLAGS	+= # -p
RM		= /bin/rm
VAR		=
VDIR		= .obj/
VSHDIR		= .shobj/
ifdef SHLIBA
VLDLIBS :=$(VLDLIBS) -lACEshr $(LIBS)
else
VLDLIBS :=$(VLDLIBS) -lACE $(LIBS)
endif
YACC		= yacc

#----------------------------------------------------------------------------
#	Conditional macro definitions
#----------------------------------------------------------------------------

ifdef debug
CFLAGS 	+= $(DCFLAGS) 
CCFLAGS	+= $(DCCFLAGS)

else
ifdef profile
CFLAGS 	+= $(PCFLAGS)
CCFLAGS	+= $(PCCFLAGS)

else
ifdef optimize
CFLAGS  += $(OCFLAGS) #-DNDEBUG 
CCFLAGS += $(OCCFLAGS) #-DNDEBUG

else # default settings
CFLAGS  += $(DCFLAGS) #-DNDEBUG 
CCFLAGS += $(DCCFLAGS) #-DNDEBUG 
endif # optimize
endif # profile
endif # debug

COMPILE.c	=$(CC) $(CFLAGS) $(CPPFLAGS)  -c
COMPILE.cc	=$(CXX) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS)  -c
LINK.c		=$(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBS)
LINK.cc		=$(LD) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS)
SOLINK.cc	=$(LINK_COMMAND) $(DLD) $(SOFLAGS)