Build identifier class
[dyninst.git] / make.config
1 # Paradyn overall build configuration (unix)
2 #
3 # $Id: make.config,v 1.50 1998/04/03 03:52:56 wylie Exp $
4 #
5
6 SUITE_NAME      = Paradyn
7 RELEASE_NUM     = 2.1
8 #BUILD_MARK     =
9
10 # Apart from actual "full" releases, don't modify these build Id components.
11 # For personal/experimental builds, feel free to use your core/make.config.local
12 # file to (re-)define BUILD_MARK as you desire.
13
14 # ***** IMPORTANT INSTALLATION/CONFIGURATION INSTRUCTIONS *****
15 # Unless your site is set-up identically to that of the Paradyn/DynInstAPI
16 # developers, you should carefully examine the (GNU)make configuration
17 # parameters defined in this file, particularly utilities such as the C/C++
18 # compilers, perl, flex and bison, and the installed locations and names
19 # for FLEX, TCL/TK, X11 and PVM (which is optional).
20
21 # uncomment/comment the following line to build with/without PVM support
22 INCLUDE_PVM_SUPPORT=true
23
24 # Destinations for library and executable installation (relative to core!)
25 # Warning: modification of the build/install structure is not recommended!
26 LIBRARY_DEST    = ../lib/$(PLATFORM)
27 PROGRAM_DEST    = ../bin/$(PLATFORM)
28
29 AS              = /bin/as
30 CC              = gcc
31
32 ifdef CROSSCOMPILER
33 AS              = /p/sp2/gcc/bin/rs6000-gcc
34 CC              = /p/sp2/gcc/bin/rs6000-gcc
35 endif
36
37 CXX             = g++
38 LEX             = flex
39 RANLIB          = ranlib
40 AR              = ar
41 YFLAGS          = -d -y
42 YACC            = bison
43 MV              = mv
44 CP              = cp
45 RM              = rm -f
46 MKDIR           = mkdir -p
47 PERL            = perl          # NB: perl v5 or higher required!
48
49 # COLLECTOR is only used by purify & quantify
50 COLLECTOR       = /s/gcc-2.7.2/bin/../lib/gcc-lib/$(PLATFORM)/2.7.2/ld
51 # BUILDSTAMP is used to generate local build vouchers
52 BUILDSTAMP      = /p/paradyn/scripts/buildstamp
53
54 ifdef CROSSCOMPILER
55 CXX             = /p/sp2/gcc/bin/rs6000-gcc
56 AR              = /p/sp2/gcc/rs6000/bin/ar
57 RANLIB          = /p/sp2/gcc/rs6000/bin/ranlib
58 endif
59
60 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
61 AS              = /usr/ccs/bin/as
62 RANLIB          = true
63 endif
64 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
65 AS              = /usr/ccs/bin/as
66 RANLIB          = true
67 endif
68
69 ifeq ($(PLATFORM),i386-unknown-linux2.0)
70 AS              = /usr/bin/as
71 RANLIB          = true 
72 endif
73
74 ifeq ($(PLATFORM),hppa1.1-hp-hpux)
75 COLLECTOR       = /usr/psup/gcc-2.6.3/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/ld
76 endif
77
78
79 ifdef PLATFORM
80 ARCH_DEF        = -D$(shell echo $$PLATFORM | $(PERL) -pe 's/\./_/g;s/-/_/g')
81 else
82 ERROR PLATFORM MUST BE DEFINED IN ORDER TO BUILD PARADYN
83 endif
84
85 # most "main" modules are only two levels deep, but we need to be able to
86 # change this for those that are deeper in the tree
87 ifndef TO_CORE
88 TO_CORE         = ../..
89 endif
90
91 # Usually, we look for files, binaries, libs in $(TO_CORE)/....<something>.
92 # But if the file doesn't exist there (i.e. if the user hasn't checked them out
93 # with cvs), then we should look in a backup location.  That's what this vrble
94 # is about.  It's used several times below in this file.
95 BACKUP_CORE = /p/paradyn/core
96
97 # Default module compiler; modules which want $(CC) should redefine
98 # this, **NOT** CC
99
100 MODCC           = $(CXX)
101 MODCFLAGS       = $(CXXFLAGS)
102
103 .SUFFIXES:      .I
104
105 IFLAGS          = -I. -I$(TO_CORE)
106
107 ASFLAGS         = -P $(ARCH_DEF)
108
109 COMMONWARNINGS  = -W -Wall -Wtraditional -Wshadow -Wpointer-arith       \
110                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
111                 -Wconversion -Wstrict-prototypes        \
112                 -Wmissing-prototypes -Wmissing-declarations             \
113                 -Wredundant-decls -Woverloaded-virtual
114
115 # not as strict as above, but can actually be used -- mdc
116 USEFULWARNINGS  = -W -Wall -Wtraditional -Wpointer-arith       \
117                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
118                 -Wconversion -Wstrict-prototypes        \
119                 -Wmissing-prototypes -Wmissing-declarations             \
120                 -Woverloaded-virtual 
121
122 # being nice to poor old pathetic tcl/tk header files --ari
123 TCLFRIENDLYWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
124                 -Wbad-function-cast -Wcast-qual \
125                 -Wconversion -Wstrict-prototypes \
126                 -Wmissing-prototypes -Wmissing-declarations \
127                 -Woverloaded-virtual
128
129 #don't inline -- for the files that won't emit template code
130 INLINE_DEFINES = 
131
132 #inline the private members of the class -- templates.o can use this
133 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
134
135 # inline everything -- the way things should be
136 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
137
138 USES_MT_THREAD =
139
140 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
141 USES_LIBDYNINSTRT_SO = true
142 endif
143
144 #ifeq ($(PLATFORM),rs6000-ibm-aix4.1)
145 #NO_OPT_FLAG = true
146 #endif
147
148 # if we don't want OPT_FLAG defined for a particular part of the code
149 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
150 # the include of make.config - naim
151 ifndef NO_OPT_FLAG
152 OPT_FLAG        = -O3
153 endif
154
155 CFLAGS          = $(IFLAGS) -Wall $(ARCH_DEF) $(OPT_FLAG)
156 CXXFLAGS        = $(IFLAGS) -Wall $(ARCH_DEF) $(OPT_FLAG)
157
158 ifdef USES_MT_THREAD
159 CFLAGS          += -DMT_THREAD
160 CXXFLAGS        += -DMT_THREAD
161 endif
162
163 ifdef USES_LIBDYNINSTRT_SO
164 CFLAGS          += -DUSES_LIBDYNINSTRT_SO
165 CXXFLAGS        += -DUSES_LIBDYNINSTRT_SO
166 endif
167
168 # flags for kludge files, won't have warnings generated
169 KFLAGS          = $(IFLAGS) -Wall $(ARCH_DEF)
170
171 ifndef OPT_FLAG
172 KFLAGS          += -g
173 ifndef DEBUG_FLAG
174 DEBUG_FLAG = -g
175 endif
176 endif
177
178 ifeq ($(DEBUG_FLAG),none)
179 DEBUG_FLAG =
180 endif
181
182 ifdef DEBUG_FLAG
183 CFLAGS   += $(DEBUG_FLAG)
184 CXXFLAGS += $(DEBUG_FLAG)
185 KFLAGS   += $(DEBUG_FLAG)
186 endif
187
188 # flags for template files, don't define external template flags
189 # -g is optional in this case -- should be defined at module level
190 TFLAGS          = $(IFLAGS) -Wall $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG)
191
192 ifdef USES_MT_THREAD
193 TFLAGS          += -DMT_THREAD
194 endif
195
196 ifdef USES_LIBDYNINSTRT_SO
197 TFLAGS          += -DUSES_LIBDYNINSTRT_SO
198 endif
199
200 ifdef DO_INLINE_ALL
201 CFLAGS         += $(ALL_INLINE_DEFINES)
202 CXXFLAGS       += $(ALL_INLINE_DEFINES)
203 endif
204
205 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
206 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
207 # we stick in (BACKUP_CORE)/lib _second_.
208 LIBDIR          = -L$(TO_CORE)/../lib/$(PLATFORM) \
209                         -L$(BACKUP_CORE)/../lib/$(PLATFORM)
210
211 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
212 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
213 # else set it to just "igen" (i.e. assume it's in the user's path)
214 ifdef CROSSCOMPILER
215 IGEN = $(shell if [ -f $(TO_CORE)/../bin/$(BASEPLATFORM)/igen ]; then echo $(TO_CORE)/../bin/$(BASEPLATFORM)/igen; else if [ -f $(BACKUP_CORE)/../bin/$(BASEPLATFORM)/igen ]; then echo $(BACKUP_CORE)/../bin/$(BASEPLATFORM)/igen; else echo igen; fi; fi )
216 else
217 IGEN = $(shell if [ -f $(TO_CORE)/../bin/$(PLATFORM)/igen ]; then echo $(TO_CORE)/../bin/$(PLATFORM)/igen; else if [ -f $(BACKUP_CORE)/../bin/$(PLATFORM)/igen ]; then echo $(BACKUP_CORE)/../bin/$(PLATFORM)/igen; else echo igen; fi; fi )
218 endif
219
220 ifdef NO_IMPLICIT_TEMPLATES
221 CFLAGS          += -fno-implicit-templates
222 CXXFLAGS        += -fno-implicit-templates
223 KFLAGS          += -fno-implicit-templates
224 TFLAGS          += -fno-implicit-templates
225 endif
226
227 ifndef INSTANTIATE_TEMPLATES
228 ifndef NO_IMPLICIT_TEMPLATES
229 # -fexternal-templates and -Dexternal_templates should both be used or
230 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
231 # (but not to TFLAGS).
232 #
233 CFLAGS          +=  -fexternal-templates -Dexternal_templates
234 CXXFLAGS        +=  -fexternal-templates -Dexternal_templates
235 KFLAGS          +=  -fexternal-templates -Dexternal_templates
236 endif
237 endif
238
239 ifdef INCLUDE_CP_PROFILING
240 INCLUDE_PVM_SUPPORT=true
241 USES_PVM=true
242 endif
243
244 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
245
246 ifdef INCLUDE_PVM_SUPPORT
247 ifdef USES_PVM
248 #PVM_ROOT needs to be correctly defined in the user's environment
249 PVM_INCDIR      = $(PVM_ROOT)/include
250 PVM_LIBDIR      = $(PVM_ROOT)/lib/$(PVM_ARCH)
251 PVM_LIB         = -lpvm3
252 IFLAGS          += -I$(PVM_INCDIR)
253 LIBDIR          += $(patsubst %,-L%,$(PVM_LIBDIR))
254 VPATH           += $(PVM_LIBDIR)
255 endif
256 endif
257
258 ifdef USES_TCLTK
259
260 TCLTK_DIR       = /p/paradyn/packages/tcl8.0
261 TCLTK_LIBS      = -ltk -ltcl
262
263 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else
264 # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else
265 # set it to just tcl2c (i.e. assume it's in the user's shell path)
266 TCL2C           = $(shell if [ -f $(TO_CORE)/tclStuff/tcl2c ]; then echo $(TO_CORE)/tclStuff/tcl2c; else if [ -f $(BACKUP_CORE)/tclStuff/tcl2c ]; then echo $(BACKUP_CORE)/tclStuff/tcl2c; else echo tcl2c; fi; fi )
267 TCL2C_GEN_SRCS  = tcl2c.C
268
269 # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists,
270 # else set it to $(BACKUP_CORE)/tclStuff/include.
271 TCLTK_INCLUDES  = $(shell if [ -d $(TO_CORE)/tclStuff/include ]; then echo $(TO_CORE)/tclStuff/include; else echo $(BACKUP_CORE)/tclStuff/include; fi )
272
273 IFLAGS          += $(patsubst %,-I%,$(TCLTK_INCLUDES))
274 ifdef CROSSCOMPILER
275 LIBDIR          += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
276 else
277 LIBDIR          += $(patsubst %,-L%/lib,$(TCLTK_DIR))
278 endif
279 endif # USES_TCLTK
280
281 ifdef USES_FLEX
282 FLEX_LIB        = -lfl
283 FLEX_DIR        = /s/flex/lib
284 LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
285 VPATH           += $(FLEX_DIR)
286 endif
287
288 ifdef CROSSCOMPILER
289 FLEX_DIR        = /s/flex/rs_aix41/lib
290 LIBDIR          += -L/p/sp2/gcc/lib 
291 endif
292
293 ifdef USES_LIBERTY
294 # Since libiberty.a is in the same g++ directory as libstdc++.a and
295 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
296 endif
297
298 ifdef USES_X11
299 X11_LIB         = -lX11
300
301 ifeq ($(PLATFORM),i386-unknown-linux2.0)
302 X11DIR          = /usr/X11
303 else
304 X11DIR          = /usr/openwin
305 endif
306
307 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
308 CFLAGS          += -I$(X11DIR)/include
309 CXXFLAGS        += -I$(X11DIR)/include
310 TFLAGS          += -I$(X11DIR)/include
311 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
312 VPATH           += $(X11DIR)/lib
313 endif
314
315 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
316 CFLAGS          += -I$(X11DIR)/include
317 CXXFLAGS        += -I$(X11DIR)/include
318 TFLAGS          += -I$(X11DIR)/include
319 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
320 VPATH           += $(X11DIR)/lib
321 endif
322
323 ifeq ($(PLATFORM),i386-unknown-linux2.0)
324 CFLAGS          += -I$(X11DIR)/include/X11
325 CXXFLAGS        += -I$(X11DIR)/include/X11
326 TFLAGS          += -I$(X11DIR)/include/X11
327 LIBDIR          += -L$(X11DIR)/lib
328 VPATH           += $(X11DIR)/include/X11
329 endif
330
331 endif # USES_X11
332
333 # Include any per-user configuration changes; this "local" config file
334 # should *not* be under CVS control, so that it never gets committed.
335
336 -include $(TO_CORE)/make.config.local