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