1 # Paradyn overall build configuration (unix)
3 # $Id: make.config,v 1.78 2000/08/31 21:17:04 bernat Exp $
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.
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).
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
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
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)
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
56 PERL = perl # NB: perl v5 or higher required!
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
64 ARCH_DEF = -D$(shell echo $$PLATFORM | $(PERL) -pe 's/\./_/g;s/-/_/g')
66 BUILDERROR: PLATFORM must be defined in environment to build (and run) Paradyn
69 # temporary hack overrides to provide "grand migration illusion"
70 # (these should be removed once definitions in sources are updated)
71 ifeq ($(PLATFORM),mips-sgi-irix6.5)
72 ARCH_DEF = -Dmips_sgi_irix6_4
74 ifeq ($(PLATFORM),i386-unknown-linux2.2)
75 ARCH_DEF = -Di386_unknown_linux2_0
77 ifeq ($(PLATFORM),i386-unknown-solaris2.6)
78 ARCH_DEF = -Di386_unknown_solaris2_5
80 ifeq ($(PLATFORM),sparc-sun-solaris2.6)
81 ARCH_DEF = -Dsparc_sun_solaris2_4
83 ifeq ($(PLATFORM),rs6000-ibm-aix4.3)
84 ARCH_DEF = -Drs6000_ibm_aix4_1
86 ifeq ($(PLATFORM),rs6000-ibm-aix4.2)
87 ARCH_DEF = -Drs6000_ibm_aix4_1
89 # [temporary hack overrides]
92 AS = /p/sp2/gcc/bin/rs6000-gcc
93 CC = /p/sp2/gcc/bin/rs6000-gcc
94 CXX = /p/sp2/gcc/bin/rs6000-gcc
95 AR = /p/sp2/gcc/rs6000/bin/ar
96 RANLIB = /p/sp2/gcc/rs6000/bin/ranlib
99 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
104 ifeq (linux,$(findstring linux,$(PLATFORM)))
110 # Default module compiler; modules which want $(CC) should redefine
114 MODCFLAGS = $(CXXFLAGS)
118 IFLAGS = -I. -I$(TO_CORE)
120 ASFLAGS = -P $(ARCH_DEF)
122 # uncomment/comment the line below to build with/without compilation warnings
123 # SILENCE_WARNINGS=true
125 ifndef SILENCE_WARNINGS
126 BASICWARNINGS = -W -Wall
128 COMMONWARNINGS = -W -Wall -Wtraditional -Wshadow -Wpointer-arith \
129 -Wbad-function-cast -Wcast-qual -Wcast-align \
130 -Wconversion -Wstrict-prototypes \
131 -Wmissing-prototypes -Wmissing-declarations \
132 -Wredundant-decls -Woverloaded-virtual
134 # not as strict as above, but can actually be used -- mdc
135 USEFULWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
136 -Wbad-function-cast -Wcast-qual -Wcast-align \
137 -Wconversion -Wstrict-prototypes \
138 -Wmissing-prototypes -Wmissing-declarations \
141 # being nice to poor old pathetic tcl/tk header files --ari
142 TCLFRIENDLYWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
143 -Wbad-function-cast -Wcast-qual \
144 -Wconversion -Wstrict-prototypes \
145 -Wmissing-prototypes -Wmissing-declarations \
147 endif # SILENCE_WARNINGS
150 GCC_VER := $(shell gcc --version)
151 ifneq (,$(findstring 2.95,$(GCC_VER)))
157 COMMONWARNINGS += -Wno-non-template-friend
158 USEFULWARNINGS += -Wno-non-template-friend
159 TCLFRIENDLYWARNINGS += -Wno-non-template-friend
162 #don't inline -- for the files that won't emit template code
165 #inline the private members of the class -- templates.o can use this
166 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
168 # inline everything -- the way things should be
169 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
173 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
174 USES_LIBDYNINSTRT_SO = true
175 USES_LIBDYNINST_SO = true
176 USES_DYNAMIC_INF_HEAP = true
178 ifeq (linux,$(findstring linux,$(PLATFORM)))
179 USES_LIBDYNINSTRT_SO = true
180 USES_LIBDYNINST_SO = true
181 USES_DYNAMIC_INF_HEAP = true
182 DETACH_ON_THE_FLY = true
184 ifeq (irix,$(findstring irix,$(PLATFORM)))
185 USES_LIBDYNINSTRT_SO = true
186 USES_LIBDYNINST_SO = true
187 USES_DYNAMIC_INF_HEAP = true
188 USES_NATIVE_CC = true
190 ifeq (osf,$(findstring osf,$(PLATFORM)))
191 USES_LIBDYNINSTRT_SO = true
192 USES_LIBDYNINST_SO = true
193 USES_DYNAMIC_INF_HEAP = true
195 ifeq (rs6000,$(findstring rs6000,$(PLATFORM)))
196 #USES_LIBDYNINSTRT_SO = false
197 USES_LIBDYNINST_SO = false
198 USES_DYNAMIC_INF_HEAP = true
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
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)
212 # flags for kludge files, won't have warnings generated
213 KFLAGS = $(IFLAGS) $(ARCH_DEF) $(BASICWARNINGS)
216 CFLAGS += -DPURE_BUILD
217 CXXFLAGS += -DPURE_BUILD
221 CFLAGS += -DMT_THREAD
222 CXXFLAGS += -DMT_THREAD
225 ifdef USES_LIBDYNINSTRT_SO
226 CFLAGS += -DUSES_LIBDYNINSTRT_SO
227 CXXFLAGS += -DUSES_LIBDYNINSTRT_SO
230 ifdef USES_DYNAMIC_INF_HEAP
231 CFLAGS += -DUSES_DYNAMIC_INF_HEAP
232 CXXFLAGS += -DUSES_DYNAMIC_INF_HEAP
235 ifdef DETACH_ON_THE_FLY
236 CFLAGS += -DDETACH_ON_THE_FLY
237 CXXFLAGS += -DDETACH_ON_THE_FLY
247 ifeq ($(DEBUG_FLAG),none)
252 CFLAGS += $(DEBUG_FLAG)
253 CXXFLAGS += $(DEBUG_FLAG)
254 KFLAGS += $(DEBUG_FLAG)
257 # flags for template files, don't define external template flags
258 # -g is optional in this case -- should be defined at module level
259 TFLAGS = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG) $(BASICWARNINGS)
262 TFLAGS += -DMT_THREAD
265 ifdef USES_LIBDYNINSTRT_SO
266 TFLAGS += -DUSES_LIBDYNINSTRT_SO
269 ifdef DETACH_ON_THE_FLY
270 TFLAGS += -DDETACH_ON_THE_FLY
274 CFLAGS += $(ALL_INLINE_DEFINES)
275 CXXFLAGS += $(ALL_INLINE_DEFINES)
278 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
279 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
280 # we stick in (BACKUP_CORE)/lib _second_.
281 LIBDIR = -L$(TO_CORE)/../lib/$(PLATFORM) \
282 -L$(BACKUP_CORE)/../lib/$(PLATFORM)
284 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
285 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
286 # else set it to just "igen" (i.e. assume it's in the user's path)
288 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 )
290 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 )
293 ifdef NO_IMPLICIT_TEMPLATES
294 CFLAGS += -fno-implicit-templates
295 CXXFLAGS += -fno-implicit-templates
296 KFLAGS += -fno-implicit-templates
299 ifndef INSTANTIATE_TEMPLATES
300 ifndef NO_IMPLICIT_TEMPLATES
301 # -fexternal-templates and -Dexternal_templates should both be used or
302 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
303 # (but not to TFLAGS).
305 CFLAGS += -fexternal-templates -Dexternal_templates
306 CXXFLAGS += -fexternal-templates -Dexternal_templates
307 KFLAGS += -fexternal-templates -Dexternal_templates
311 ifdef INCLUDE_CP_PROFILING
312 INCLUDE_PVM_SUPPORT=true
316 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
318 ifdef INCLUDE_PVM_SUPPORT
320 BUILDERROR: PVM_ROOT must be defined in environment to build (and run) Paradyn
323 BUILDERROR: PVM_ARCH must be defined in environment to build (and run) Paradyn
326 PVM_INCDIR = $(PVM_ROOT)/include
327 PVM_LIBDIR = $(PVM_ROOT)/lib/$(PVM_ARCH)
329 IFLAGS += -I$(PVM_INCDIR)
330 LIBDIR += $(patsubst %,-L%,$(PVM_LIBDIR))
331 VPATH += $(PVM_LIBDIR)
337 TCLTK_DIR = /p/paradyn/packages/tcl8.3.0
338 TCLTK_INCLUDES = $(TCLTK_DIR)/include
339 TCLTK_LIBVER_ID = 8.3
340 TCL_LIB = -ltcl$(TCLTK_LIBVER_ID)
341 TK_LIB = -ltk$(TCLTK_LIBVER_ID)
342 TCLTK_LIBS = $(TCL_LIB) $(TK_LIB)
344 # TCL2C is used to generate compilable sources from tcl files
345 TCL2C = $(TO_CORE)/../scripts/tcl2c
346 TCL2C_GEN_SRCS = tcl2c.C
348 IFLAGS += $(patsubst %,-I%,$(TCLTK_INCLUDES))
350 LIBDIR += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
352 LIBDIR += $(patsubst %,-L%/lib,$(TCLTK_DIR))
358 FLEX_DIR = /s/flex/lib
359 LIBDIR += $(patsubst %,-L%,$(FLEX_DIR))
364 FLEX_DIR = /s/flex/rs_aix41/lib
365 LIBDIR += -L/p/sp2/gcc/lib
369 # Since libiberty.a is in the same g++ directory as libstdc++.a and
370 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
376 #ifeq (solaris,$(findstring solaris,$(PLATFORM)))
377 ## current releases of /usr/openwin have bad include files, however,
378 ## if that's what you have and you're prepared to live with it, go ahead
379 #X11DIR = /usr/openwin
380 #CFLAGS += -fpermissive
381 #TFLAGS += -fpermissive
382 #CXXFLAGS += -fpermissive
387 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
388 CFLAGS += -I$(X11DIR)/include
389 CXXFLAGS += -I$(X11DIR)/include
390 TFLAGS += -I$(X11DIR)/include
391 LIBDIR += -R$(X11DIR)/lib -L$(X11DIR)/lib
392 VPATH += $(X11DIR)/lib
395 ifeq (linux,$(findstring linux,$(PLATFORM)))
396 CFLAGS += -I$(X11DIR)/include/X11
397 CXXFLAGS += -I$(X11DIR)/include/X11
398 TFLAGS += -I$(X11DIR)/include/X11
399 LIBDIR += -L$(X11DIR)/lib
400 VPATH += $(X11DIR)/include/X11
405 # Include any per-user configuration changes; this "local" config file
406 # should *not* be under CVS control, so that it never gets committed.
408 -include $(TO_CORE)/make.config.local