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