1 # Paradyn overall build configuration (unix)
3 # $Id: make.config,v 1.61 1999/03/19 20:26:06 paradyn 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).
21 # uncomment/comment the following line to build with/without PVM support
22 INCLUDE_PVM_SUPPORT=true
24 # most "main" modules are only two levels deep, but we need to be able to
25 # change this for those that are deeper in the tree
30 # Destinations for library and executable installation (relative to core!)
31 # Warning: modification of the build/install structure is not recommended!
32 LIBRARY_DEST = ../lib/$(PLATFORM)
33 PROGRAM_DEST = ../bin/$(PLATFORM)
35 # Usually, we look for files, binaries, libs in $(TO_CORE)/....<something>.
36 # But if the file doesn't exist there (i.e. if the user hasn't checked them out
37 # with cvs), then we should look in a backup location. That's what this vrble
38 # is about. It's used several times below in this file.
39 BACKUP_CORE = /p/paradyn/core
53 PERL = perl # NB: perl v5 or higher required!
55 # COLLECTOR is only used by purify & quantify
56 COLLECTOR = /s/gcc-2.7.2/bin/../lib/gcc-lib/$(PLATFORM)/2.7.2/ld
57 # BUILDSTAMP is used to generate local build vouchers
58 BUILDSTAMP = $(TO_CORE)/../scripts/buildstamp
61 ARCH_DEF = -D$(shell echo $$PLATFORM | $(PERL) -pe 's/\./_/g;s/-/_/g')
63 BUILDERROR: PLATFORM must be defined in environment to build (and run) Paradyn
67 ifeq ($(PLATFORM),sparc-sun-solaris2.6)
68 PLATFORM = sparc-sun-solaris2.4
69 ARCH_DEF = -Dsparc_sun_solaris2_4
74 AS = /p/sp2/gcc/bin/rs6000-gcc
75 CC = /p/sp2/gcc/bin/rs6000-gcc
76 CXX = /p/sp2/gcc/bin/rs6000-gcc
77 AR = /p/sp2/gcc/rs6000/bin/ar
78 RANLIB = /p/sp2/gcc/rs6000/bin/ranlib
81 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
85 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
90 ifeq ($(PLATFORM),i386-unknown-linux2.0)
96 # Default module compiler; modules which want $(CC) should redefine
100 MODCFLAGS = $(CXXFLAGS)
104 IFLAGS = -I. -I$(TO_CORE)
106 ASFLAGS = -P $(ARCH_DEF)
108 ifeq ($(CVSROOT),/p/paradyn/CVSROOT)
111 ifeq ($(CVSROOT),/fs/mashie2/hollings/CVSROOT)
116 # uncomment/comment the line below to build with/without compilation warnings
117 SILENCE_WARNINGS=true
120 ifndef SILENCE_WARNINGS
121 BASICWARNINGS = -W -Wall
123 COMMONWARNINGS = -W -Wall -Wtraditional -Wshadow -Wpointer-arith \
124 -Wbad-function-cast -Wcast-qual -Wcast-align \
125 -Wconversion -Wstrict-prototypes \
126 -Wmissing-prototypes -Wmissing-declarations \
127 -Wredundant-decls -Woverloaded-virtual
129 # not as strict as above, but can actually be used -- mdc
130 USEFULWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
131 -Wbad-function-cast -Wcast-qual -Wcast-align \
132 -Wconversion -Wstrict-prototypes \
133 -Wmissing-prototypes -Wmissing-declarations \
136 # being nice to poor old pathetic tcl/tk header files --ari
137 TCLFRIENDLYWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
138 -Wbad-function-cast -Wcast-qual \
139 -Wconversion -Wstrict-prototypes \
140 -Wmissing-prototypes -Wmissing-declarations \
142 endif # SILENCE_WARNINGS
144 #don't inline -- for the files that won't emit template code
147 #inline the private members of the class -- templates.o can use this
148 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
150 # inline everything -- the way things should be
151 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
155 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
156 USES_LIBDYNINSTRT_SO = true
158 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
159 USES_LIBDYNINSTRT_SO = true
161 ifeq ($(PLATFORM),i386-unknown-linux2.0)
162 USES_LIBDYNINSTRT_SO = true
164 ifeq ($(PLATFORM),mips-sgi-irix6.4)
165 USES_LIBDYNINSTRT_SO = true
166 USES_DYNAMIC_INF_HEAP = true
169 #ifeq ($(PLATFORM),rs6000-ibm-aix4.1)
173 # if we don't want OPT_FLAG defined for a particular part of the code
174 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
175 # the include of make.config - naim
180 # flags for normal (non-kludge) files, with common warnings
181 CFLAGS = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
182 CXXFLAGS = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS)
184 # flags for kludge files, won't have warnings generated
185 KFLAGS = $(IFLAGS) $(ARCH_DEF) $(BASICWARNINGS)
188 CFLAGS += -DPURE_BUILD
189 CXXFLAGS += -DPURE_BUILD
193 CFLAGS += -DMT_THREAD
194 CXXFLAGS += -DMT_THREAD
197 ifdef USES_LIBDYNINSTRT_SO
198 CFLAGS += -DUSES_LIBDYNINSTRT_SO
199 CXXFLAGS += -DUSES_LIBDYNINSTRT_SO
202 ifdef USES_DYNAMIC_INF_HEAP
203 CFLAGS += -DUSES_DYNAMIC_INF_HEAP
204 CXXFLAGS += -DUSES_DYNAMIC_INF_HEAP
214 ifeq ($(DEBUG_FLAG),none)
219 CFLAGS += $(DEBUG_FLAG)
220 CXXFLAGS += $(DEBUG_FLAG)
221 KFLAGS += $(DEBUG_FLAG)
224 # flags for template files, don't define external template flags
225 # -g is optional in this case -- should be defined at module level
226 TFLAGS = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG) $(BASICWARNINGS)
229 TFLAGS += -DMT_THREAD
232 ifdef USES_LIBDYNINSTRT_SO
233 TFLAGS += -DUSES_LIBDYNINSTRT_SO
237 CFLAGS += $(ALL_INLINE_DEFINES)
238 CXXFLAGS += $(ALL_INLINE_DEFINES)
241 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
242 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
243 # we stick in (BACKUP_CORE)/lib _second_.
244 LIBDIR = -L$(TO_CORE)/../lib/$(PLATFORM) \
245 -L$(BACKUP_CORE)/../lib/$(PLATFORM)
247 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
248 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
249 # else set it to just "igen" (i.e. assume it's in the user's path)
251 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 )
253 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 )
256 ifdef NO_IMPLICIT_TEMPLATES
257 CFLAGS += -fno-implicit-templates
258 CXXFLAGS += -fno-implicit-templates
259 KFLAGS += -fno-implicit-templates
260 TFLAGS += -fno-implicit-templates
263 ifndef INSTANTIATE_TEMPLATES
264 ifndef NO_IMPLICIT_TEMPLATES
265 # -fexternal-templates and -Dexternal_templates should both be used or
266 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
267 # (but not to TFLAGS).
269 CFLAGS += -fexternal-templates -Dexternal_templates
270 CXXFLAGS += -fexternal-templates -Dexternal_templates
271 KFLAGS += -fexternal-templates -Dexternal_templates
275 ifdef INCLUDE_CP_PROFILING
276 INCLUDE_PVM_SUPPORT=true
280 # ***** EXTERNAL SOFTWARE CONFIGURATION *****
282 ifdef INCLUDE_PVM_SUPPORT
284 BUILDERROR: PVM_ROOT must be defined in environment to build (and run) Paradyn
287 BUILDERROR: PVM_ARCH must be defined in environment to build (and run) Paradyn
290 PVM_INCDIR = $(PVM_ROOT)/include
291 PVM_LIBDIR = $(PVM_ROOT)/lib/$(PVM_ARCH)
293 IFLAGS += -I$(PVM_INCDIR)
294 LIBDIR += $(patsubst %,-L%,$(PVM_LIBDIR))
295 VPATH += $(PVM_LIBDIR)
301 TCLTK_DIR = /p/paradyn/packages/tcl8.0
302 TCLTK_LIBS = -ltk -ltcl
303 #TCLTK_LIBS = -ltk8.0 -ltcl8.0
305 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else
306 # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else
307 # set it to just tcl2c (i.e. assume it's in the user's shell path)
308 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 )
309 TCL2C_GEN_SRCS = tcl2c.C
311 # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists,
312 # else set it to $(BACKUP_CORE)/tclStuff/include.
313 TCLTK_INCLUDES = $(shell if [ -d $(TO_CORE)/tclStuff/include ]; then echo $(TO_CORE)/tclStuff/include; else echo $(BACKUP_CORE)/tclStuff/include; fi )
315 IFLAGS += $(patsubst %,-I%,$(TCLTK_INCLUDES))
317 LIBDIR += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR))
319 LIBDIR += $(patsubst %,-L%/lib,$(TCLTK_DIR))
325 FLEX_DIR = /s/flex/lib
326 LIBDIR += $(patsubst %,-L%,$(FLEX_DIR))
331 FLEX_DIR = /s/flex/rs_aix41/lib
332 LIBDIR += -L/p/sp2/gcc/lib
336 # Since libiberty.a is in the same g++ directory as libstdc++.a and
337 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
343 ifeq ($(PLATFORM),i386-unknown-linux2.0)
346 X11DIR = /usr/openwin
349 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
350 CFLAGS += -I$(X11DIR)/include
351 CXXFLAGS += -I$(X11DIR)/include
352 TFLAGS += -I$(X11DIR)/include
353 LIBDIR += -R$(X11DIR)/lib -L$(X11DIR)/lib
354 VPATH += $(X11DIR)/lib
357 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
358 CFLAGS += -I$(X11DIR)/include
359 CXXFLAGS += -I$(X11DIR)/include
360 TFLAGS += -I$(X11DIR)/include
361 LIBDIR += -R$(X11DIR)/lib -L$(X11DIR)/lib
362 VPATH += $(X11DIR)/lib
365 ifeq ($(PLATFORM),i386-unknown-linux2.0)
366 CFLAGS += -I$(X11DIR)/include/X11
367 CXXFLAGS += -I$(X11DIR)/include/X11
368 TFLAGS += -I$(X11DIR)/include/X11
369 LIBDIR += -L$(X11DIR)/lib
370 VPATH += $(X11DIR)/include/X11
376 PLATFORM = sparc-sun-solaris2.6
379 # Include any per-user configuration changes; this "local" config file
380 # should *not* be under CVS control, so that it never gets committed.
382 -include $(TO_CORE)/make.config.local