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