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