1 # Paradyn overall build configuration (unix)
3 # $Id: make.config,v 1.80 2000/11/20 23:12:49 schendel 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
189 USE_IRIX_FIXES = true
191 ifeq (osf,$(findstring osf,$(PLATFORM)))
192 USES_LIBDYNINSTRT_SO = true
193 USES_LIBDYNINST_SO = true
194 USES_DYNAMIC_INF_HEAP = true
196 ifeq (rs6000,$(findstring rs6000,$(PLATFORM)))
197 #USES_LIBDYNINSTRT_SO = false
198 USES_LIBDYNINST_SO = false
199 USES_DYNAMIC_INF_HEAP = true
202 # if we don't want OPT_FLAG defined for a particular part of the code
203 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
204 # the include of make.config - naim
209 # flags for normal (non-kludge) files, with common warnings
210 CFLAGS = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
211 CXXFLAGS = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
213 # flags for kludge files, won't have warnings generated
214 KFLAGS = $(IFLAGS) $(ARCH_DEF) $(BASICWARNINGS)
217 CFLAGS += -DPURE_BUILD
218 CXXFLAGS += -DPURE_BUILD
222 CFLAGS += -DMT_THREAD
223 CXXFLAGS += -DMT_THREAD
226 ifdef USES_LIBDYNINSTRT_SO
227 CFLAGS += -DUSES_LIBDYNINSTRT_SO
228 CXXFLAGS += -DUSES_LIBDYNINSTRT_SO
231 ifdef USES_DYNAMIC_INF_HEAP
232 CFLAGS += -DUSES_DYNAMIC_INF_HEAP
233 CXXFLAGS += -DUSES_DYNAMIC_INF_HEAP
236 ifdef DETACH_ON_THE_FLY
237 CFLAGS += -DDETACH_ON_THE_FLY
238 CXXFLAGS += -DDETACH_ON_THE_FLY
248 ifeq ($(DEBUG_FLAG),none)
253 CFLAGS += $(DEBUG_FLAG)
254 CXXFLAGS += $(DEBUG_FLAG)
255 KFLAGS += $(DEBUG_FLAG)
258 # flags for template files, don't define external template flags
259 # -g is optional in this case -- should be defined at module level
260 TFLAGS = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG) $(BASICWARNINGS)
263 TFLAGS += -DMT_THREAD
266 ifdef USES_LIBDYNINSTRT_SO
267 TFLAGS += -DUSES_LIBDYNINSTRT_SO
270 ifdef DETACH_ON_THE_FLY
271 TFLAGS += -DDETACH_ON_THE_FLY
275 CFLAGS += -DUSE_IRIX_FIXES
276 CXXFLAGS += -DUSE_IRIX_FIXES
280 CFLAGS += $(ALL_INLINE_DEFINES)
281 CXXFLAGS += $(ALL_INLINE_DEFINES)
284 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
285 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
286 # we stick in (BACKUP_CORE)/lib _second_.
287 LIBDIR = -L$(TO_CORE)/../lib/$(PLATFORM) \
288 -L$(BACKUP_CORE)/../lib/$(PLATFORM)
290 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
291 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
292 # else set it to just "igen" (i.e. assume it's in the user's path)
294 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 )
296 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 )
299 ifdef NO_IMPLICIT_TEMPLATES
300 CFLAGS += -fno-implicit-templates
301 CXXFLAGS += -fno-implicit-templates
302 KFLAGS += -fno-implicit-templates
305 ifndef INSTANTIATE_TEMPLATES
306 ifndef NO_IMPLICIT_TEMPLATES
307 # -fexternal-templates and -Dexternal_templates should both be used or
308 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
309 # (but not to TFLAGS).
311 CFLAGS += -fexternal-templates -Dexternal_templates
312 CXXFLAGS += -fexternal-templates -Dexternal_templates
313 KFLAGS += -fexternal-templates -Dexternal_templates
317 ifdef INCLUDE_CP_PROFILING
318 INCLUDE_PVM_SUPPORT=true
322 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
324 ifdef INCLUDE_PVM_SUPPORT
326 BUILDERROR: PVM_ROOT must be defined in environment to build (and run) Paradyn
329 BUILDERROR: PVM_ARCH must be defined in environment to build (and run) Paradyn
332 PVM_INCDIR = $(PVM_ROOT)/include
333 PVM_LIBDIR = $(PVM_ROOT)/lib/$(PVM_ARCH)
335 IFLAGS += -I$(PVM_INCDIR)
336 LIBDIR += $(patsubst %,-L%,$(PVM_LIBDIR))
337 VPATH += $(PVM_LIBDIR)
342 HRTIME_ROOT = /p/paradyn/packages/libhrtime-0.6
343 HRTIME_INCDIR = $(HRTIME_ROOT)/include
344 HRTIME_LIBDIR = $(HRTIME_ROOT)/lib
345 HRTIME_LIB = -Wl,-static -lhrtime -Wl,-Bdynamic
346 IFLAGS += -I$(HRTIME_INCDIR)
347 LIBDIR += $(patsubst %,-L%,$(HRTIME_LIBDIR))
356 TCLTK_DIR = /p/paradyn/packages/tcl8.3.0
357 TCLTK_INCLUDES = $(TCLTK_DIR)/include
358 TCLTK_LIBVER_ID = 8.3
359 TCL_LIB = -ltcl$(TCLTK_LIBVER_ID)
360 TK_LIB = -ltk$(TCLTK_LIBVER_ID)
361 TCLTK_LIBS = $(TCL_LIB) $(TK_LIB)
363 # TCL2C is used to generate compilable sources from tcl files
364 TCL2C = $(TO_CORE)/../scripts/tcl2c
365 TCL2C_GEN_SRCS = tcl2c.C
367 IFLAGS += $(patsubst %,-I%,$(TCLTK_INCLUDES))
369 LIBDIR += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
371 LIBDIR += $(patsubst %,-L%/lib,$(TCLTK_DIR))
377 FLEX_DIR = /s/flex/lib
378 LIBDIR += $(patsubst %,-L%,$(FLEX_DIR))
383 FLEX_DIR = /s/flex/rs_aix41/lib
384 LIBDIR += -L/p/sp2/gcc/lib
388 # Since libiberty.a is in the same g++ directory as libstdc++.a and
389 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
395 #ifeq (solaris,$(findstring solaris,$(PLATFORM)))
396 ## current releases of /usr/openwin have bad include files, however,
397 ## if that's what you have and you're prepared to live with it, go ahead
398 #X11DIR = /usr/openwin
399 #CFLAGS += -fpermissive
400 #TFLAGS += -fpermissive
401 #CXXFLAGS += -fpermissive
406 ifeq (solaris,$(findstring solaris,$(PLATFORM)))
407 CFLAGS += -I$(X11DIR)/include
408 CXXFLAGS += -I$(X11DIR)/include
409 TFLAGS += -I$(X11DIR)/include
410 LIBDIR += -R$(X11DIR)/lib -L$(X11DIR)/lib
411 VPATH += $(X11DIR)/lib
414 ifeq (linux,$(findstring linux,$(PLATFORM)))
415 CFLAGS += -I$(X11DIR)/include/X11
416 CXXFLAGS += -I$(X11DIR)/include/X11
417 TFLAGS += -I$(X11DIR)/include/X11
418 LIBDIR += -L$(X11DIR)/lib
419 VPATH += $(X11DIR)/include/X11
424 # Include any per-user configuration changes; this "local" config file
425 # should *not* be under CVS control, so that it never gets committed.
427 -include $(TO_CORE)/make.config.local