Removing -O3 option for aix - naim
[dyninst.git] / make.config
1 #
2 # $Log: make.config,v $
3 # Revision 1.44  1997/09/08 21:47:42  naim
4 # Removing -O3 option for aix - naim
5 #
6 # Revision 1.43  1997/09/05 21:52:16  naim
7 # Adding -O3 for every platform - naim
8 #
9 # Revision 1.42  1997/09/05 13:13:15  naim
10 # Adding -O3 option only for solaris platforms - naim
11 #
12 # Revision 1.41  1997/09/04 22:50:51  naim
13 # Adding optimization option - naim
14 #
15 # Revision 1.40  1997/08/19 19:50:20  naim
16 # Adding support to dynamically link libdyninstRT by using dlopen on sparc-
17 # solaris - naim
18 #
19 # Revision 1.39  1997/05/07 19:03:40  naim
20 # Getting rid of old support for threads and turning it off until the new
21 # version is finished. Additionally, new superTable, baseTable and superVector
22 # classes for future support of multiple threads. The fastInferiorHeap class has
23 # also changed - naim
24 #
25 # Revision 1.38  1997/02/28 15:54:50  naim
26 # Turning MT_THREAD flag to "true" in order to use vector of counter/timers - naim
27 #
28 # Revision 1.37  1997/01/27 19:35:52  naim
29 # Part of the base instrumentation for supporting multithreaded applications
30 # (vectors of counter/timers) implemented for all current platforms +
31 # different bug fixes - naim
32 #
33 # Revision 1.36  1996/11/26 16:02:13  naim
34 # Implementation of cross-compiler (sparc-solaris,x86-solaris)->rs6000 - naim
35 #
36 # Revision 1.35  1996/11/08 23:38:17  tamches
37 # added support for a DEBUG_FLAG of 'none'
38 #
39 # Revision 1.34  1996/10/28 23:05:52  tamches
40 # added DEBUG_FLAG feature
41 #
42 # Revision 1.33  1996/10/18 23:46:03  mjrg
43 # Solaris/X86 port
44 #
45 # Revision 1.32  1996/08/05 07:08:18  tamches
46 # Added BACKUP_CORE, which removes several "/p/paradyn" dependencies.
47 # Upgraded to tcl 7.5
48 # removed obsolete USES_BLT
49 # removed AIX kludges for FLEX_DIR
50 #
51 # Revision 1.31  1996/05/12 04:36:48  tamches
52 # FLEX_DIR in /usr/local/lib for aix 4.1
53 #
54 # Revision 1.30  1996/04/06 21:18:08  hollings
55 # Removed write-strings warning (eliminates several thousand warnings on AIX
56 # that are due to bad system header files).
57 #
58 # Revision 1.29  1996/01/05  19:43:18  tamches
59 # IGEN, TCL2C, and TCLTK_INCLUDES (IGEN is a new variable) set more
60 # intelligently (we look for several possibilities)
61 #
62 # Revision 1.28  1995/12/29 20:09:30  tamches
63 # Changed the collector to gcc 2.7.1's "ld", from 2.6.3
64 #
65 # Revision 1.27  1995/12/20 01:09:55  tamches
66 # removed -L/usr/psup/lib from LIBDIR
67 # removed TCLTK_DIRS, replacing with 2 different things:
68 #    TCLTK_INCLUDES and TCLTK_LIBS
69 # TCL2C and TCL2C_GEN_SRCS added
70 # changed FLEX_DIR to a new directory
71 # removed LIBERTY_DIR and associated stuff (not needed anymore)
72 #
73
74 AS              = /bin/as
75 CC              = gcc
76
77 ifdef CROSSCOMPILER
78 AS              = /p/sp2/gcc/bin/rs6000-gcc
79 CC              = /p/sp2/gcc/bin/rs6000-gcc
80 endif
81
82 CXX             = g++
83 LEX             = flex
84 RANLIB          = ranlib
85 AR              = ar
86 YFLAGS          = -d -y
87 YACC            = bison
88 # COLLECTOR is only used by purify & quantify
89 COLLECTOR       = /s/gcc-2.7.2/bin/../lib/gcc-lib/$(PLATFORM)/2.7.2/ld
90
91 ifdef CROSSCOMPILER
92 CXX             = /p/sp2/gcc/bin/rs6000-gcc
93 AR              = /p/sp2/gcc/rs6000/bin/ar
94 RANLIB          = /p/sp2/gcc/rs6000/bin/ranlib
95 endif
96
97 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
98 AS              = /usr/ccs/bin/as
99 RANLIB          = true
100 endif
101 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
102 AS              = /usr/ccs/bin/as
103 RANLIB          = true
104 endif
105
106 ifeq ($(PLATFORM),hppa1.1-hp-hpux)
107 COLLECTOR       = /usr/psup/gcc-2.6.3/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/ld
108 endif
109
110
111 ifdef PLATFORM
112 ARCH_DEF        = -D$(shell echo $$PLATFORM | perl -pe 's/\./_/g;s/-/_/g')
113 else
114 ERROR PLATFORM MUST BE DEFINED IN ORDER TO BUILD PARADYN
115 endif
116
117 # most "main" modules are only two levels deep, but we need to be able to
118 # change this for those that are deeper in the tree
119 ifndef TO_CORE
120 TO_CORE         = ../..
121 endif
122
123 # Usually, we look for files, binaries, libs in $(TO_CORE)/....<something>.
124 # But if the file doesn't exist there (i.e. if the user hasn't checked them out
125 # with cvs), then we should look in a backup location.  That's what this vrble
126 # is about.  It's used several times below in this file.
127 BACKUP_CORE = /p/paradyn/core
128
129 # Default module compiler; modules which want $(CC) should redefine
130 # this, **NOT** CC
131
132 MODCC           = $(CXX)
133 MODCFLAGS       = $(CXXFLAGS)
134
135 .SUFFIXES:      .I
136
137 # VPATH         = ../src:$(TO_CORE)/../lib/$(PLATFORM):/p/paradyn/lib/$(PLATFORM)
138
139 IFLAGS          = -I. -I$(TO_CORE)
140
141 ASFLAGS         = -P $(ARCH_DEF)
142
143 COMMONWARNINGS  = -W -Wall -Wtraditional -Wshadow -Wpointer-arith       \
144                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
145                 -Wconversion -Wstrict-prototypes        \
146                 -Wmissing-prototypes -Wmissing-declarations             \
147                 -Wredundant-decls -Woverloaded-virtual
148
149 # not as strict as above, but can actually be used -- mdc
150 USEFULWARNINGS  = -W -Wall -Wtraditional -Wpointer-arith       \
151                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
152                 -Wconversion -Wstrict-prototypes        \
153                 -Wmissing-prototypes -Wmissing-declarations             \
154                 -Woverloaded-virtual 
155
156 # being nice to poor old pathetic tcl/tk header files --ari
157 TCLFRIENDLYWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \
158                 -Wbad-function-cast -Wcast-qual \
159                 -Wconversion -Wstrict-prototypes \
160                 -Wmissing-prototypes -Wmissing-declarations \
161                 -Woverloaded-virtual
162
163 #don't inline -- for the files that won't emit template code
164 INLINE_DEFINES = 
165
166 #inline the private members of the class -- templates.o can use this
167 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
168
169 # inline everything -- the way things should be
170 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
171
172 USES_MT_THREAD =
173 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
174 USES_LIBDYNINSTRT_SO = true
175 endif
176
177 # for the time being, do not optimize any part of the system for aix
178 ifeq ($(PLATFORM),rs6000-ibm-aix4.1)
179 NO_OPT_FLAG = true
180 endif
181
182 # if we don't want OPT_FLAG defined for a particular part of the code
183 # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing
184 # the include of make.config - naim
185 ifndef NO_OPT_FLAG
186 OPT_FLAG        = -O3
187 endif
188
189 CFLAGS          = $(IFLAGS) -Wall $(ARCH_DEF) $(OPT_FLAG)
190 CXXFLAGS        = $(IFLAGS) -Wall $(ARCH_DEF) $(OPT_FLAG)
191
192 ifdef USES_MT_THREAD
193 CFLAGS          += -DMT_THREAD
194 CXXFLAGS        += -DMT_THREAD
195 endif
196
197 ifdef USES_LIBDYNINSTRT_SO
198 CFLAGS          += -DUSES_LIBDYNINSTRT_SO
199 CXXFLAGS        += -DUSES_LIBDYNINSTRT_SO
200 endif
201
202 # flags for kludge files, won't have warnings generated
203 KFLAGS          = $(IFLAGS) -Wall $(ARCH_DEF)
204
205 ifndef OPT_FLAG
206 KFLAGS          += -g
207 ifndef DEBUG_FLAG
208 DEBUG_FLAG = -g
209 endif
210 endif
211
212 ifeq ($(DEBUG_FLAG),none)
213 DEBUG_FLAG =
214 endif
215
216 ifdef DEBUG_FLAG
217 CFLAGS   += $(DEBUG_FLAG)
218 CXXFLAGS += $(DEBUG_FLAG)
219 KFLAGS   += $(DEBUG_FLAG)
220 endif
221
222 # flags for template files, don't define external template flags
223 # -g is optional in this case -- should be defined at module level
224 TFLAGS          = $(IFLAGS) -Wall $(TEMP_INLINE_DEFINES) $(ARCH_DEF) \
225                         $(OPT_FLAG)
226
227 ifdef USES_MT_THREAD
228 TFLAGS          += -DMT_THREAD
229 endif
230
231 ifdef USES_LIBDYNINSTRT_SO
232 TFLAGS          += -DUSES_LIBDYNINSTRT_SO
233 endif
234
235 ifdef DO_INLINE_ALL
236 CFLAGS         += $(ALL_INLINE_DEFINES)
237 CXXFLAGS       += $(ALL_INLINE_DEFINES)
238 endif
239
240 # Start off LIBDIR to point to the user's devel area's paradyn lib directory.
241 # As a backup, in case the user hasn't checked out & compiled some paradyn lib,
242 # we stick in (BACKUP_CORE)/lib _second_.
243 LIBDIR          = -L$(TO_CORE)/../lib/$(PLATFORM) \
244                         -L$(BACKUP_CORE)/../lib/$(PLATFORM)
245
246 # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists,
247 # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists,
248 # else set it to just "igen" (i.e. assume it's in the user's path)
249 ifdef CROSSCOMPILER
250 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 )
251 else
252 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 )
253 endif
254
255 ifdef NO_IMPLICIT_TEMPLATES
256 CFLAGS          += -fno-implicit-templates
257 CXXFLAGS        += -fno-implicit-templates
258 KFLAGS          += -fno-implicit-templates
259 TFLAGS          += -fno-implicit-templates
260 endif
261
262 ifndef INSTANTIATE_TEMPLATES
263 ifndef NO_IMPLICIT_TEMPLATES
264 # -fexternal-templates and -Dexternal_templates should both be used or
265 # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS
266 # (but not to TFLAGS).
267 #
268 CFLAGS          +=  -fexternal-templates -Dexternal_templates
269 CXXFLAGS        +=  -fexternal-templates -Dexternal_templates
270 KFLAGS          +=  -fexternal-templates -Dexternal_templates
271 endif
272 endif
273
274 ifdef USES_PVM
275 PVM_DIR         = $(PVM_ROOT)/lib/$(PVM_ARCH)
276 IFLAGS          += -I$(PVM_ROOT)/include
277 LIBDIR          += $(patsubst %,-L%,$(PVM_DIR))
278 VPATH           += $(PVM_DIR)
279 endif
280
281 ifdef USES_TCLTK
282 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else
283 # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else
284 # set it to just tcl2c (i.e. assume it's in the user's shell path)
285 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 )
286 TCL2C_GEN_SRCS  = tcl2c.C
287
288 # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists,
289 # else set it to $(BACKUP_CORE)/tclStuff/include.
290 TCLTK_INCLUDES  = $(shell if [ -d $(TO_CORE)/tclStuff/include ]; then echo $(TO_CORE)/tclStuff/include; else echo $(BACKUP_CORE)/tclStuff/include; fi )
291
292 TCLTK_LIBS      = /p/paradyn/packages/tcl7.5
293
294 IFLAGS          += $(patsubst %,-I%,$(TCLTK_INCLUDES))
295 ifdef CROSSCOMPILER
296 LIBDIR          += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_LIBS))
297 else
298 LIBDIR          += $(patsubst %,-L%/lib,$(TCLTK_LIBS))
299 endif
300 endif
301
302 ifdef USES_FLEX
303 FLEX_DIR        = /s/flex/lib
304 LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
305 VPATH           += $(FLEX_DIR)
306 endif
307
308 ifdef CROSSCOMPILER
309 FLEX_DIR        = /s/flex/rs_aix41/lib
310 LIBDIR          += -L/p/sp2/gcc/lib 
311 endif
312
313 ifdef USES_LIBERTY
314 # Since libiberty.a is in the same g++ directory as libstdc++.a and
315 # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at
316 endif
317
318 ifdef USES_X11
319 ifeq ($(PLATFORM),sparc-sun-solaris2.4)
320 CFLAGS          += -I/usr/openwin/include
321 CXXFLAGS        += -I/usr/openwin/include
322 TFLAGS          += -I/usr/openwin/include
323 LIBDIR          += -R/usr/openwin/lib -L/usr/openwin/lib
324 VPATH           += /usr/openwin/lib
325 endif
326
327 ifeq ($(PLATFORM),i386-unknown-solaris2.5)
328 CFLAGS          += -I/usr/openwin/include
329 CXXFLAGS        += -I/usr/openwin/include
330 TFLAGS          += -I/usr/openwin/include
331 LIBDIR          += -R/usr/openwin/lib -L/usr/openwin/lib
332 VPATH           += /usr/openwin/lib
333 endif
334
335 endif
336
337 # Include any per-user configuration changes; this "local" config file
338 # should *not* be under CVS control, so that it never gets committed.
339
340 -include $(TO_CORE)/make.config.local