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