+ Changed to bitpattern generated NaN, rather than sqrt(-1).
[dyninst.git] / make.config
1 # Paradyn overall build configuration (unix)
2 #
3 # $Id: make.config,v 1.65 1999/09/10 14:25:23 nash 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 ifndef GCC_2_95
148 GCC_VER := $(shell gcc --version)
149 ifneq (,$(findstring 2.95,$(GCC_VER)))
150 GCC_2_95 = true
151 endif
152 endif
153
154 ifdef GCC_2_95
155 COMMONWARNINGS += -Wno-non-template-friend
156 USEFULWARNINGS += -Wno-non-template-friend
157 TCLFRIENDLYWARNINGS += -Wno-non-template-friend
158 XFLAGS += -fpermissive
159 endif
160
161 #don't inline -- for the files that won't emit template code
162 INLINE_DEFINES = 
163
164 #inline the private members of the class -- templates.o can use this
165 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
166
167 # inline everything -- the way things should be
168 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
169
170 USES_MT_THREAD =
171
172 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
173 USES_LIBDYNINSTRT_SO = true
174 USES_LIBDYNINST_SO = true
175 USES_DYNAMIC_INF_HEAP = true
176 endif
177 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
178 USES_LIBDYNINSTRT_SO = true
179 USES_LIBDYNINST_SO = true
180 endif
181 ifeq ($(PLATFORM),i386-unknown-linux2.0)
182 USES_LIBDYNINSTRT_SO = true
183 USES_LIBDYNINST_SO = true
184 endif
185 ifeq ($(PLATFORM),mips-sgi-irix6.4)
186 USES_LIBDYNINSTRT_SO = true
187 USES_LIBDYNINST_SO = true
188 USES_DYNAMIC_INF_HEAP = true
189 USES_NATIVE_CC = true
190 endif
191 ifeq ($(PLATFORM),alpha-dec-osf4.0)
192 USES_LIBDYNINSTRT_SO = true
193 USES_LIBDYNINST_SO = true
194 USES_DYNAMIC_INF_HEAP = true
195 endif
196
197 #ifeq ($(PLATFORM),rs6000-ibm-aix4.1)
198 #NO_OPT_FLAG = true
199 #endif
200
201 # if we don't want OPT_FLAG defined for a particular part of the code
202 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
203 # the include of make.config - naim
204 ifndef NO_OPT_FLAG
205 OPT_FLAG        = -O3
206 endif
207
208 # flags for normal (non-kludge) files, with common warnings
209 CFLAGS          = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
210 CXXFLAGS        = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
211
212 # flags for kludge files, won't have warnings generated
213 KFLAGS          = $(IFLAGS) $(ARCH_DEF) $(BASICWARNINGS)
214
215 ifdef USING_PURIFY
216 CFLAGS          += -DPURE_BUILD
217 CXXFLAGS        += -DPURE_BUILD
218 endif
219
220 ifdef USES_MT_THREAD
221 CFLAGS          += -DMT_THREAD
222 CXXFLAGS        += -DMT_THREAD
223 endif
224
225 ifdef USES_LIBDYNINSTRT_SO
226 CFLAGS          += -DUSES_LIBDYNINSTRT_SO
227 CXXFLAGS        += -DUSES_LIBDYNINSTRT_SO
228 endif
229
230 ifdef USES_DYNAMIC_INF_HEAP
231 CFLAGS          += -DUSES_DYNAMIC_INF_HEAP
232 CXXFLAGS        += -DUSES_DYNAMIC_INF_HEAP
233 endif
234
235 ifndef OPT_FLAG
236 KFLAGS          += -g
237 ifndef DEBUG_FLAG
238 DEBUG_FLAG = -g
239 endif
240 endif
241
242 ifeq ($(DEBUG_FLAG),none)
243 DEBUG_FLAG =
244 endif
245
246 ifdef DEBUG_FLAG
247 CFLAGS   += $(DEBUG_FLAG)
248 CXXFLAGS += $(DEBUG_FLAG)
249 KFLAGS   += $(DEBUG_FLAG)
250 endif
251
252 # flags for template files, don't define external template flags
253 # -g is optional in this case -- should be defined at module level
254 TFLAGS          = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG) $(BASICWARNINGS)
255
256 ifdef USES_MT_THREAD
257 TFLAGS          += -DMT_THREAD
258 endif
259
260 ifdef USES_LIBDYNINSTRT_SO
261 TFLAGS          += -DUSES_LIBDYNINSTRT_SO
262 endif
263
264 ifdef DO_INLINE_ALL
265 CFLAGS         += $(ALL_INLINE_DEFINES)
266 CXXFLAGS       += $(ALL_INLINE_DEFINES)
267 endif
268
269 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
270 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
271 # we stick in (BACKUP_CORE)/lib _second_.
272 LIBDIR          = -L$(TO_CORE)/../lib/$(PLATFORM) \
273                         -L$(BACKUP_CORE)/../lib/$(PLATFORM)
274
275 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
276 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
277 # else set it to just "igen" (i.e. assume it's in the user's path)
278 ifdef CROSSCOMPILER
279 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 )
280 else
281 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 )
282 endif
283
284 ifdef NO_IMPLICIT_TEMPLATES
285 CFLAGS          += -fno-implicit-templates
286 CXXFLAGS        += -fno-implicit-templates
287 KFLAGS          += -fno-implicit-templates
288 TFLAGS          += -fno-implicit-templates
289 endif
290
291 ifndef INSTANTIATE_TEMPLATES
292 ifndef NO_IMPLICIT_TEMPLATES
293 # -fexternal-templates and -Dexternal_templates should both be used or
294 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
295 # (but not to TFLAGS).
296 #
297 CFLAGS          +=  -fexternal-templates -Dexternal_templates
298 CXXFLAGS        +=  -fexternal-templates -Dexternal_templates
299 KFLAGS          +=  -fexternal-templates -Dexternal_templates
300 endif
301 endif
302
303 ifdef INCLUDE_CP_PROFILING
304 INCLUDE_PVM_SUPPORT=true
305 USES_PVM=true
306 endif
307
308 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
309
310 ifdef INCLUDE_PVM_SUPPORT
311 ifndef PVM_ROOT
312 BUILDERROR: PVM_ROOT must be defined in environment to build (and run) Paradyn
313 endif
314 ifndef PVM_ARCH
315 BUILDERROR: PVM_ARCH must be defined in environment to build (and run) Paradyn
316 endif
317 ifdef USES_PVM
318 PVM_INCDIR      = $(PVM_ROOT)/include
319 PVM_LIBDIR      = $(PVM_ROOT)/lib/$(PVM_ARCH)
320 PVM_LIB         = -lpvm3
321 IFLAGS          += -I$(PVM_INCDIR)
322 LIBDIR          += $(patsubst %,-L%,$(PVM_LIBDIR))
323 VPATH           += $(PVM_LIBDIR)
324 endif
325 endif
326
327 ifdef USES_TCLTK
328
329 TCLTK_DIR       = /p/paradyn/packages/tcl8.0
330 TCLTK_LIBS      = -ltk -ltcl
331 #TCLTK_LIBS     = -ltk8.0 -ltcl8.0
332
333 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else
334 # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else
335 # set it to just tcl2c (i.e. assume it's in the user's shell path)
336 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 )
337 TCL2C_GEN_SRCS  = tcl2c.C
338
339 # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists,
340 # else set it to $(BACKUP_CORE)/tclStuff/include.
341 TCLTK_INCLUDES  = $(shell if [ -d $(TO_CORE)/tclStuff/include ]; then echo $(TO_CORE)/tclStuff/include; else echo $(BACKUP_CORE)/tclStuff/include; fi )
342
343 IFLAGS          += $(patsubst %,-I%,$(TCLTK_INCLUDES))
344 ifdef CROSSCOMPILER
345 LIBDIR          += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
346 else
347 LIBDIR          += $(patsubst %,-L%/lib,$(TCLTK_DIR))
348 endif
349 endif # USES_TCLTK
350
351 ifdef USES_FLEX
352 FLEX_LIB        = -lfl
353 FLEX_DIR        = /s/flex/lib
354 LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
355 VPATH           += $(FLEX_DIR)
356 endif
357
358 ifdef CROSSCOMPILER
359 FLEX_DIR        = /s/flex/rs_aix41/lib
360 LIBDIR          += -L/p/sp2/gcc/lib 
361 endif
362
363 ifdef USES_LIBERTY
364 # Since libiberty.a is in the same g++ directory as libstdc++.a and
365 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
366 endif
367
368 ifdef USES_X11
369 X11_LIB         = -lX11
370
371 ifeq ($(PLATFORM),i386-unknown-linux2.0)
372 X11DIR          = /usr/X11R6
373 else
374 X11DIR          = /usr/openwin
375 endif
376
377 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
378 CFLAGS          += -I$(X11DIR)/include
379 CXXFLAGS        += -I$(X11DIR)/include
380 TFLAGS          += -I$(X11DIR)/include
381 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
382 VPATH           += $(X11DIR)/lib
383 endif
384
385 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
386 CFLAGS          += -I$(X11DIR)/include
387 CXXFLAGS        += -I$(X11DIR)/include
388 TFLAGS          += -I$(X11DIR)/include
389 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
390 VPATH           += $(X11DIR)/lib
391 endif
392
393 ifeq ($(PLATFORM),i386-unknown-linux2.0)
394 CFLAGS          += -I$(X11DIR)/include/X11
395 CXXFLAGS        += -I$(X11DIR)/include/X11
396 TFLAGS          += -I$(X11DIR)/include/X11
397 LIBDIR          += -L$(X11DIR)/lib
398 VPATH           += $(X11DIR)/include/X11
399 endif
400
401 endif # USES_X11
402
403 ifdef RESET_PF
404 PLATFORM        = sparc-sun-solaris2.6
405 endif
406
407 # Include any per-user configuration changes; this "local" config file
408 # should *not* be under CVS control, so that it never gets committed.
409
410 -include $(TO_CORE)/make.config.local