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