Adds support for iostreams-style output of Microsoft's __int64 data type.
[dyninst.git] / make.config
1 # Paradyn overall build configuration (unix)
2 #
3 # $Id: make.config,v 1.68 1999/12/17 23:10:01 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 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 ifdef CROSSCOMPILER
70 AS              = /p/sp2/gcc/bin/rs6000-gcc
71 CC              = /p/sp2/gcc/bin/rs6000-gcc
72 CXX             = /p/sp2/gcc/bin/rs6000-gcc
73 AR              = /p/sp2/gcc/rs6000/bin/ar
74 RANLIB          = /p/sp2/gcc/rs6000/bin/ranlib
75 endif
76
77 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
78 AS              = /usr/ccs/bin/as
79 RANLIB          = true
80 endif
81 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
82 AS              = /usr/ccs/bin/as
83 RANLIB          = true
84 endif
85
86 ifeq ($(PLATFORM),i386-unknown-linux2.0)
87 AS              = /usr/bin/as
88 RANLIB          = true 
89 endif
90
91
92 # Default module compiler; modules which want $(CC) should redefine
93 # this, **NOT** CC
94
95 MODCC           = $(CXX)
96 MODCFLAGS       = $(CXXFLAGS)
97
98 .SUFFIXES:      .I
99
100 IFLAGS          = -I. -I$(TO_CORE)
101
102 ASFLAGS         = -P $(ARCH_DEF)
103
104 # uncomment/comment the line below to build with/without compilation warnings
105 # SILENCE_WARNINGS=true
106
107 ifndef SILENCE_WARNINGS
108 BASICWARNINGS   = -W -Wall
109
110 COMMONWARNINGS  = -W -Wall -Wtraditional -Wshadow -Wpointer-arith       \
111                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
112                 -Wconversion -Wstrict-prototypes        \
113                 -Wmissing-prototypes -Wmissing-declarations             \
114                 -Wredundant-decls -Woverloaded-virtual
115
116 # not as strict as above, but can actually be used -- mdc
117 USEFULWARNINGS  = -W -Wall -Wtraditional -Wpointer-arith       \
118                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
119                 -Wconversion -Wstrict-prototypes        \
120                 -Wmissing-prototypes -Wmissing-declarations             \
121                 -Woverloaded-virtual
122
123 # being nice to poor old pathetic tcl/tk header files --ari
124 TCLFRIENDLYWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
125                 -Wbad-function-cast -Wcast-qual \
126                 -Wconversion -Wstrict-prototypes \
127                 -Wmissing-prototypes -Wmissing-declarations \
128                 -Woverloaded-virtual
129 endif # SILENCE_WARNINGS
130
131 ifndef GCC_2_95
132 GCC_VER := $(shell gcc --version)
133 ifneq (,$(findstring 2.95,$(GCC_VER)))
134 GCC_2_95 = true
135 endif
136 endif
137
138 ifdef GCC_2_95
139 COMMONWARNINGS += -Wno-non-template-friend
140 USEFULWARNINGS += -Wno-non-template-friend
141 TCLFRIENDLYWARNINGS += -Wno-non-template-friend
142 XFLAGS += -fpermissive
143 endif
144
145 #don't inline -- for the files that won't emit template code
146 INLINE_DEFINES = 
147
148 #inline the private members of the class -- templates.o can use this
149 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
150
151 # inline everything -- the way things should be
152 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
153
154 USES_MT_THREAD =
155
156 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
157 USES_LIBDYNINSTRT_SO = true
158 USES_LIBDYNINST_SO = true
159 USES_DYNAMIC_INF_HEAP = true
160 endif
161 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
162 USES_LIBDYNINSTRT_SO = true
163 USES_LIBDYNINST_SO = true
164 endif
165 ifeq ($(PLATFORM),i386-unknown-linux2.0)
166 USES_LIBDYNINSTRT_SO = true
167 USES_LIBDYNINST_SO = true
168 endif
169 ifeq ($(PLATFORM),mips-sgi-irix6.4)
170 USES_LIBDYNINSTRT_SO = true
171 USES_LIBDYNINST_SO = true
172 USES_DYNAMIC_INF_HEAP = true
173 USES_NATIVE_CC = true
174 endif
175 ifeq ($(PLATFORM),alpha-dec-osf4.0)
176 USES_LIBDYNINSTRT_SO = true
177 USES_LIBDYNINST_SO = true
178 USES_DYNAMIC_INF_HEAP = true
179 endif
180
181 #ifeq ($(PLATFORM),rs6000-ibm-aix4.1)
182 #NO_OPT_FLAG = true
183 #endif
184
185 # if we don't want OPT_FLAG defined for a particular part of the code
186 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
187 # the include of make.config - naim
188 ifndef NO_OPT_FLAG
189 OPT_FLAG        = -O3
190 endif
191
192 # flags for normal (non-kludge) files, with common warnings
193 CFLAGS          = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
194 CXXFLAGS        = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
195
196 # flags for kludge files, won't have warnings generated
197 KFLAGS          = $(IFLAGS) $(ARCH_DEF) $(BASICWARNINGS)
198
199 ifdef USING_PURIFY
200 CFLAGS          += -DPURE_BUILD
201 CXXFLAGS        += -DPURE_BUILD
202 endif
203
204 ifdef USES_MT_THREAD
205 CFLAGS          += -DMT_THREAD
206 CXXFLAGS        += -DMT_THREAD
207 endif
208
209 ifdef USES_LIBDYNINSTRT_SO
210 CFLAGS          += -DUSES_LIBDYNINSTRT_SO
211 CXXFLAGS        += -DUSES_LIBDYNINSTRT_SO
212 endif
213
214 ifdef USES_DYNAMIC_INF_HEAP
215 CFLAGS          += -DUSES_DYNAMIC_INF_HEAP
216 CXXFLAGS        += -DUSES_DYNAMIC_INF_HEAP
217 endif
218
219 ifndef OPT_FLAG
220 KFLAGS          += -g
221 ifndef DEBUG_FLAG
222 DEBUG_FLAG = -g
223 endif
224 endif
225
226 ifeq ($(DEBUG_FLAG),none)
227 DEBUG_FLAG =
228 endif
229
230 ifdef DEBUG_FLAG
231 CFLAGS   += $(DEBUG_FLAG)
232 CXXFLAGS += $(DEBUG_FLAG)
233 KFLAGS   += $(DEBUG_FLAG)
234 endif
235
236 # flags for template files, don't define external template flags
237 # -g is optional in this case -- should be defined at module level
238 TFLAGS          = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG) $(BASICWARNINGS)
239
240 ifdef USES_MT_THREAD
241 TFLAGS          += -DMT_THREAD
242 endif
243
244 ifdef USES_LIBDYNINSTRT_SO
245 TFLAGS          += -DUSES_LIBDYNINSTRT_SO
246 endif
247
248 ifdef DO_INLINE_ALL
249 CFLAGS         += $(ALL_INLINE_DEFINES)
250 CXXFLAGS       += $(ALL_INLINE_DEFINES)
251 endif
252
253 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
254 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
255 # we stick in (BACKUP_CORE)/lib _second_.
256 LIBDIR          = -L$(TO_CORE)/../lib/$(PLATFORM) \
257                         -L$(BACKUP_CORE)/../lib/$(PLATFORM)
258
259 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
260 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
261 # else set it to just "igen" (i.e. assume it's in the user's path)
262 ifdef CROSSCOMPILER
263 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 )
264 else
265 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 )
266 endif
267
268 ifdef NO_IMPLICIT_TEMPLATES
269 CFLAGS          += -fno-implicit-templates
270 CXXFLAGS        += -fno-implicit-templates
271 KFLAGS          += -fno-implicit-templates
272 TFLAGS          += -fno-implicit-templates
273 endif
274
275 ifndef INSTANTIATE_TEMPLATES
276 ifndef NO_IMPLICIT_TEMPLATES
277 # -fexternal-templates and -Dexternal_templates should both be used or
278 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
279 # (but not to TFLAGS).
280 #
281 CFLAGS          +=  -fexternal-templates -Dexternal_templates
282 CXXFLAGS        +=  -fexternal-templates -Dexternal_templates
283 KFLAGS          +=  -fexternal-templates -Dexternal_templates
284 endif
285 endif
286
287 ifdef INCLUDE_CP_PROFILING
288 INCLUDE_PVM_SUPPORT=true
289 USES_PVM=true
290 endif
291
292 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
293
294 ifdef INCLUDE_PVM_SUPPORT
295 ifndef PVM_ROOT
296 BUILDERROR: PVM_ROOT must be defined in environment to build (and run) Paradyn
297 endif
298 ifndef PVM_ARCH
299 BUILDERROR: PVM_ARCH must be defined in environment to build (and run) Paradyn
300 endif
301 ifdef USES_PVM
302 PVM_INCDIR      = $(PVM_ROOT)/include
303 PVM_LIBDIR      = $(PVM_ROOT)/lib/$(PVM_ARCH)
304 PVM_LIB         = -lpvm3
305 IFLAGS          += -I$(PVM_INCDIR)
306 LIBDIR          += $(patsubst %,-L%,$(PVM_LIBDIR))
307 VPATH           += $(PVM_LIBDIR)
308 endif
309 endif
310
311 ifdef USES_TCLTK
312
313 TCLTK_DIR       = /p/paradyn/packages/tcl8.2.2
314 TCLTK_LIBS      = -ltk8.2 -ltcl8.2
315
316 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else
317 # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else
318 # set it to just tcl2c (i.e. assume it's in the user's shell path)
319 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 )
320 TCL2C_GEN_SRCS  = tcl2c.C
321
322 # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists,
323 # else set it to $(BACKUP_CORE)/tclStuff/include.
324 TCLTK_INCLUDES  = /p/paradyn/packages/tcl8.2.2/include
325
326
327 IFLAGS          += $(patsubst %,-I%,$(TCLTK_INCLUDES))
328 ifdef CROSSCOMPILER
329 LIBDIR          += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
330 else
331 LIBDIR          += $(patsubst %,-L%/lib,$(TCLTK_DIR))
332 endif
333 endif # USES_TCLTK
334
335 ifdef USES_FLEX
336 FLEX_LIB        = -lfl
337 FLEX_DIR        = /s/flex/lib
338 LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
339 VPATH           += $(FLEX_DIR)
340 endif
341
342 ifdef CROSSCOMPILER
343 FLEX_DIR        = /s/flex/rs_aix41/lib
344 LIBDIR          += -L/p/sp2/gcc/lib 
345 endif
346
347 ifdef USES_LIBERTY
348 # Since libiberty.a is in the same g++ directory as libstdc++.a and
349 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
350 endif
351
352 ifdef USES_X11
353 X11_LIB         = -lX11
354
355 ifeq ($(PLATFORM),i386-unknown-linux2.0)
356 X11DIR          = /usr/X11R6
357 else
358 #X11DIR         = /usr/openwin
359 X11DIR          = /usr/X11R6
360 endif
361
362 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
363 CFLAGS          += -I$(X11DIR)/include
364 CXXFLAGS        += -I$(X11DIR)/include
365 TFLAGS          += -I$(X11DIR)/include
366 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
367 VPATH           += $(X11DIR)/lib
368 endif
369
370 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
371 CFLAGS          += -I$(X11DIR)/include
372 CXXFLAGS        += -I$(X11DIR)/include
373 TFLAGS          += -I$(X11DIR)/include
374 LIBDIR          += -R$(X11DIR)/lib -L$(X11DIR)/lib
375 VPATH           += $(X11DIR)/lib
376 endif
377
378 ifeq ($(PLATFORM),i386-unknown-linux2.0)
379 CFLAGS          += -I$(X11DIR)/include/X11
380 CXXFLAGS        += -I$(X11DIR)/include/X11
381 TFLAGS          += -I$(X11DIR)/include/X11
382 LIBDIR          += -L$(X11DIR)/lib
383 VPATH           += $(X11DIR)/include/X11
384 endif
385
386 endif # USES_X11
387
388 # Include any per-user configuration changes; this "local" config file
389 # should *not* be under CVS control, so that it never gets committed.
390
391 -include $(TO_CORE)/make.config.local