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