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