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