upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr / build / NWGNUenvironment.inc
1 #
2 # Setup needed Tools and Libraries
3 #
4
5 ifeq "$(wildcard $(APR_WORK)\build\NWGNUcustom.inc)" "$(APR_WORK)\build\NWGNUcustom.inc"
6 include $(APR_WORK)\build\NWGNUcustom.inc
7 CUSTOM_INI = $(AP_WORK)\NWGNUcustom.ini
8 endif
9
10 ifndef VERBOSE
11 .SILENT:
12 endif
13
14 #
15 # Treat like an include
16 #
17 ifndef EnvironmentDefined
18
19 #
20 # simple macros for parsing makefiles
21 #
22 EOLIST:=
23 EMPTY :=
24 COMMA := ,
25 SPACE := $(EMPTY) $(EMPTY)
26
27 #
28 # Base environment
29 #
30
31 # Try and handle case issues
32 ifndef NOVELLLIBC
33 ifdef NovellLibC
34 NOVELLLIBC = $(NovellLibC)
35 endif
36 endif
37
38 ifndef NOVELLLIBC
39 NOVELLLIBC = C:/novell/ndk/libc
40 endif
41
42 # This is a placeholder
43 # ifndef LDAPSDK
44 # LDAPSDK = C:/novell/ndk/cldapsdk
45 # endif
46
47 ifndef METROWERKS
48 METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
49 endif
50
51 # If LM_LICENSE_FILE isn't defined, define a variable that can be used to
52 # restart make with it defined
53 ifndef LM_LICENSE_FILE
54 NO_LICENSE_FILE = NO_LICENSE_FILE
55 endif
56
57 #
58 # Set the Release type that you want to build, possible values are:
59 #
60 #  debug                - full debug switches are set
61 #  noopt                - normal switches are set (default)
62 #  optimized    - optimization switches are set
63
64 ifdef reltype
65 RELEASE=$(reltype)
66 endif
67
68 ifdef RELTYPE
69 RELEASE=$(RELTYPE)
70 endif
71
72 ifdef debug
73 RELEASE=debug
74 endif
75
76 ifdef DEBUG
77 RELEASE=debug
78 endif
79
80 ifdef optimized
81 RELEASE=optimized
82 endif
83
84 ifdef OPTIMIZED
85 RELEASE=optimized
86 endif
87
88 ifndef RELEASE
89 RELEASE = optimized
90 endif
91
92 ifeq "$(RELEASE)" "debug"
93 OBJDIR = Debug
94 endif
95
96 ifeq "$(RELEASE)" "noopt"
97 OBJDIR = Noopt
98 endif
99
100 ifeq "$(RELEASE)" "optimized"
101 OBJDIR = Release
102 endif
103
104 #
105 # Setup compiler information
106 #
107
108 # MetroWerks NLM tools
109 CC      = mwccnlm
110 CPP     = mwccnlm
111 LINK    = mwldnlm
112 LIB     = mwldnlm -type library -w nocmdline
113 WIN_CC  = mwcc
114
115 # Setup build tools
116 AWK     = awk
117
118 NOVI    = $(NOVELLLIBC)\imports
119
120 INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
121
122 DEFINES = -DNETWARE
123 ifndef DEBUG
124 DEFINES += -DNDEBUG
125 endif
126
127 # MetroWerks static Libraries
128 CLIB3S  = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
129 MATH3S  =
130 PLIB3S  = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
131
132 # MetroWerks Win32 build flags to create build tool
133 MWCW_MSL   = "$(METROWERKS)/MSL"
134 MWCW_W32   = "$(METROWERKS)/Win32-x86 Support"
135 WIN_CFLAGS =  -O2 -gccinc -nodefaults -proc 586 -w off
136 WIN_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
137 WIN_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
138
139 # Base compile flags
140 # and prefix or precompiled header added here.
141
142 # The default flags are as follows:
143 #
144 # -c                    compile only, no link
145 # -nosyspath            treat #include <...> like #include "..."
146 # -Cpp_exceptions off   disable C++ exceptions
147 # -RTTI off             disable C++ run-time typing information
148 # -align 4              align on 4 byte bounderies
149 # -w nocmdline          disable command-line driver/parser warnings
150 # -proc PII             generate code base on Pentium II instruction set
151 # -inst mmx             use MMX extensions (not used)
152
153 CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
154
155 # -g                    generate debugging information
156 # -O0                   level 0 optimizations
157
158 ifeq "$(RELEASE)" "debug"
159 CFLAGS += -g -O0
160 endif
161
162 # -O4,p                 level 4 optimizations, optimize for speed
163 ifeq "$(RELEASE)" "optimized"
164 CFLAGS += -O4,p
165 endif
166
167 # -prefix apr_arch_pre_nw.h      #include pre_nw.h for all files
168
169 CFLAGS += -prefix apr_arch_pre_nw.h
170
171
172 PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
173
174 #
175 # Declare major project deliverables output directories here
176 #
177
178 ifdef DEST
179 INSTALL = $(DEST)
180 ifeq (\, $(findstring \,$(INSTALL)))
181 INSTDIRS = $(DEST)
182 endif
183 endif
184
185 ifdef dest
186 INSTALL = $(dest)
187 ifeq (\, $(findstring \,$(INSTALL)))
188 INSTDIRS = $(dest)
189 endif
190 endif
191
192 ifndef INSTALL
193 INSTALL = $(APR_WORK)\Dist
194 INSTDIRS = $(APR_WORK)\Dist
195 endif
196
197 # Add support for building IPV6 alongside
198 ifneq "$(IPV6)" ""
199 DEFINES += -DNW_BUILD_IPV6
200 INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
201
202 ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
203 OBJDIR := $(OBJDIR)_IPV6
204 endif
205         
206 ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
207 INSTALL := $(INSTALL)_IPV6
208 endif        
209
210 ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
211 INSTDIRS := $(INSTDIRS)_IPV6
212 endif
213
214 endif
215
216 ifdef DEST
217 INSTALLBASE := $(INSTALL)\Apache2
218
219 INSTDEVDIRS := \
220     $(INSTDIRS) \
221         $(INSTALLBASE) \
222         $(INSTALLBASE)\include \
223         $(INSTALLBASE)\lib \
224
225 INSTDIRS += \
226         $(INSTALLBASE) \
227         
228 else
229 INSTALLBASE := $(INSTALL)\apr
230
231 INSTDEVDIRS := \
232     $(INSTDIRS) \
233         $(INSTALLBASE) \
234         $(INSTALLBASE)\include \
235         $(INSTALLBASE)\lib \
236
237 INSTDIRS += \
238         $(INSTALLBASE) \
239         
240 endif   
241
242 #
243 # Declare Command and tool macros here
244 #
245
246 # Os2LibPath is an extra check to see if we are on NT
247 ifdef Os2LibPath
248 OS = Windows_NT
249 endif
250
251 ifeq "$(OS)" "Windows_NT"
252 CMD=cmd /C
253 CHK=cmd /C if exist
254 CHKNOT=cmd /C if not exist
255 DEL = del /F
256 DELTREE = cmd /C rd /s/q
257 WINNT=1
258 XCOPYSW = /E
259 else
260 CMD=command /C
261 CHK=command /C if exist
262 CHKNOT=command /C if not exist
263 DEL = del
264 DELTREE = deltree /y
265 XCOPYSW = /E /Y
266 endif
267
268
269 #
270 # Setup base C compiler flags
271 #
272
273 #
274 # Common directories
275 #
276
277 APR                     = $(APR_WORK)
278 APRTEST         = $(APR_WORK)/test
279 APRUTIL         = $(APR_WORK)/../apr-util
280 XML                     = $(APRUTIL)/xml
281
282 #
283 # Internal Libraries
284 #
285
286 APRLIB          = $(APR)/$(OBJDIR)/aprlib.lib
287 APRUTLIB        = $(APRUTIL)/$(OBJDIR)/aprutil.lib
288 XMLLIB          = $(XML)/$(OBJDIR)/xmllib.lib
289
290 #
291 # Additional general defines
292 #
293
294 EnvironmentDefined = 1
295 endif # ifndef EnvironmentDefined
296
297 # This is always set so that it will show up in lower directories
298
299 ifdef Path
300 Path = $(PATH)
301 endif
302