Simplified setting of ARCH_DEF, include a local config file, removed
[dyninst.git] / make.config
1 #
2 # $Log: make.config,v $
3 # Revision 1.15  1995/02/27 17:34:10  jcargill
4 # Simplified setting of ARCH_DEF, include a local config file, removed
5 # explicit gcc path bogusness
6 #
7 # Revision 1.14  1995/02/16  07:55:28  markc
8 # Added flags for template and kludge files.
9 # Added automatic generation of architecture defines (-Dsparc_sun_sunos4.1.3, etc)
10 # Added inline defines to generate stl code properly.
11 #
12 # Revision 1.13  1995/01/30  20:42:44  jcargill
13 # Fixed error; use CXX rather then CC++
14 #
15 # Revision 1.12  1995/01/30  18:08:15  jcargill
16 # Major build system reorganization
17 #
18 # Revision 1.11  1994/09/30  19:21:07  rbi
19 # itty bitty typo fix
20 #
21 # Revision 1.10  1994/06/29  03:02:45  hollings
22 # AFS file paths
23 # added -fexternal-templates to CFLAGS
24 #
25 # Revision 1.9  1994/05/17  00:20:37  hollings
26 # added default baselined lib to VPATH
27 #
28 #
29 #
30
31 AS              = /bin/as
32 CC              = gcc
33 CXX             = g++
34 LEX             = flex
35 RANLIB          = ranlib
36 YFLAGS          = -d -y
37 YACC            = bison
38
39 ifeq ($(PLATFORM),sparc-sun-solaris2.3)
40 AS              = /usr/ccs/bin/as
41 RANLIB          = true
42 endif
43
44 ifdef PLATFORM
45 ARCH_DEF        = -D$(shell echo $$PLATFORM | perl -pe 's/\./_/g;s/-/_/g')
46 else
47 ERROR PLATFORM MUST BE DEFINED IN ORDER TO BUILD PARADYN
48 endif
49
50 # most "main" modules are only two levels deep, but we need to be able to
51 # change this for those that are deeper in the tree
52 ifndef TO_CORE
53 TO_CORE         = ../..
54 endif
55
56 # Default module compiler; modules which want $(CC) should redefine
57 # this, **NOT** CC
58
59 MODCC           = $(CXX)
60 MODCFLAGS       = $(CXXFLAGS)
61
62
63 .SUFFIXES:      .I
64
65 # VPATH         = ../src:$(TO_CORE)/../lib/$(PLATFORM):/p/paradyn/lib/$(PLATFORM)
66
67 IFLAGS          = -I. -I$(TO_CORE)
68
69 ASFLAGS         = -P $(IFLAGS)
70
71 COMMONWARNINGS  = -W -Wall -Wtraditional -Wshadow -Wpointer-arith       \
72                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
73                 -Wwrite-strings -Wconversion -Wstrict-prototypes        \
74                 -Wmissing-prototypes -Wmissing-declarations             \
75                 -Wredundant-decls -Woverloaded-virtual
76
77 # not as strict as above, but can actually be used -- mdc
78 USEFULWARNINGS  = -W -Wall -Wtraditional -Wpointer-arith       \
79                 -Wbad-function-cast -Wcast-qual -Wcast-align            \
80                 -Wwrite-strings -Wconversion -Wstrict-prototypes        \
81                 -Wmissing-prototypes -Wmissing-declarations             \
82                 -Woverloaded-virtual 
83
84 #don't inline -- for the files that won't emit template code
85 INLINE_DEFINES = 
86
87 #inline the private members of the class -- templates.o can use this
88 TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline"
89
90 # inline everything -- the way things should be
91 ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline"
92
93 # -fexternal-templates and -Dexternal_templates should both be used
94 # or neither should be used
95 CFLAGS          = $(IFLAGS) -g -Wall -fexternal-templates -Dexternal_templates \
96                   $(ARCH_DEF) $(INLINE_DEFINES)
97 CXXFLAGS          = $(IFLAGS) -g -Wall -fexternal-templates -Dexternal_templates \
98                     $(ARCH_DEF) $(INLINE_DEFINES)
99
100 # flags for kludge files, won't have warnings generated
101 KFLAGS          = $(IFLAGS) -g -Wall -fexternal-templates -Dexternal_templates \
102                   $(INLINE_DEFINES) $(ARCH_DEF)
103
104 # flags for template files, don't define external template flags
105 # -g is optional in this case -- should be defined at module level
106 TFLAGS          = $(IFLAGS) -Wall $(TEMP_INLINE_DEFINES) $(ARCH_DEF)
107
108 LIBDIR          = -L$(TO_CORE)/../lib/$(PLATFORM) \
109                   -L/p/paradyn/lib/$(PLATFORM) \
110                   -L/usr/psup/lib
111
112 ifdef USES_PVM
113 PVM_DIR         = /p/paradyn/packages/pvm3/lib/$(PLATFORM)
114 IFLAGS          += -I/p/paradyn/packages/pvm3/include
115 LIBDIR          += $(patsubst %,-L%,$(PVM_DIR))
116 VPATH           += $(PVM_DIR)
117 endif
118
119 ifdef USES_TCLTK
120 TCLTK_DIRS      = /p/paradyn/packages/tk3.6 /p/paradyn/packages/tcl7.3
121 IFLAGS          += $(patsubst %,-I%,$(TCLTK_DIRS))
122 LIBDIR          += $(patsubst %,-L%/$(PLATFORM),$(TCLTK_DIRS))
123 VPATH           += $(TCLTK_DIRS)
124 endif
125
126 ifdef USES_FLEX
127 FLEX_DIR        = /usr/psup/lib
128 LIBDIR          += $(patsubst %,-L%,$(FLEX_DIR))
129 VPATH           += $(FLEX_DIR)
130 endif
131
132 ifdef USES_LIBERTY
133 LIBERTY_DIR     = /usr/psup/gcc/lib
134 LIBDIR          += $(patsubst %,-L%,$(LIBERTY_DIR))
135 VPATH           += $(LIBERTY_DIR)
136 endif
137
138 ifdef USES_BLT
139 BLT_DIR         = /p/paradyn/packages/blt-1.7
140 LIBDIR          += $(patsubst %,-L%/$(PLATFORM),$(BLT_DIR))
141 VPATH           += $(BLT_DIR)/$(PLATFORM)
142 endif
143
144 ifdef USES_X11
145 ifeq ($(PLATFORM),sparc-sun-solaris2.3)
146 CFLAGS          += -I/usr/openwin/include
147 CXXFLAGS        += -I/usr/openwin/include
148 TFLAGS          += -I/usr/openwin/include
149 LIBDIR          += -L/usr/openwin/lib
150 VPATH           += /usr/openwin/lib
151 endif
152 endif
153
154
155 ifeq ($(PLATFORM),sparc-sun-solaris2.3)
156 RANLIB          = true
157 endif
158
159
160 # Include any per-user configuration changes; this "local" config file
161 # should *not* be under CVS control, so that it never gets committed.
162
163 -include $(TO_CORE)/make.config.local