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