upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / build / NWGNUenvironment.inc
1 #
2 # Setup needed Tools and Libraries
3 #
4
5 ifeq "$(wildcard $(AP_WORK)\NWGNUcustom.ini)" "$(AP_WORK)\NWGNUcustom.ini"
6 include $(AP_WORK)\NWGNUcustom.ini
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 # This is a placeholder
48 # ifndef ZLIBSDK
49 # ZLIBSDK = C:/novell/ndk/zlibsdk
50 # endif
51
52 ifndef METROWERKS
53 METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
54 endif
55
56 # If LM_LICENSE_FILE isn't defined, define a variable that can be used to
57 # restart make with it defined
58 ifndef LM_LICENSE_FILE
59 NO_LICENSE_FILE = NO_LICENSE_FILE
60 endif
61
62 #
63 # Set the Release type that you want to build, possible values are:
64 #
65 #  debug                - full debug switches are set
66 #  noopt                - normal switches are set (default)
67 #  optimized    - optimization switches are set
68
69 ifdef reltype
70 RELEASE=$(reltype)
71 endif
72
73 ifdef RELTYPE
74 RELEASE=$(RELTYPE)
75 endif
76
77 ifdef debug
78 RELEASE=debug
79 endif
80
81 ifdef DEBUG
82 RELEASE=debug
83 endif
84
85 ifdef optimized
86 RELEASE=optimized
87 endif
88
89 ifdef OPTIMIZED
90 RELEASE=optimized
91 endif
92
93 ifndef RELEASE
94 RELEASE = optimized
95 endif
96
97 ifeq "$(RELEASE)" "debug"
98 OBJDIR = Debug
99 endif
100
101 ifeq "$(RELEASE)" "noopt"
102 OBJDIR = Noopt
103 endif
104
105 ifeq "$(RELEASE)" "optimized"
106 OBJDIR = Release
107 endif
108
109 #
110 # Setup compiler information
111 #
112
113 # MetroWerks NLM tools
114 CC      = mwccnlm
115 CPP     = mwccnlm
116 LINK    = mwldnlm
117 LIB     = mwldnlm -type library -w nocmdline
118 WIN_CC  = mwcc
119
120 NOVI    = $(NOVELLLIBC)\imports
121
122 INCDIRS         = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
123 ifneq "$(LDAPSDK)" ""
124 INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
125 endif
126 ifneq "$(ZLIBSDK)" ""
127 INCDIRS := $(INCDIRS);$(ZLIBSDK)
128 endif
129
130 DEFINES         = -DNETWARE
131 ifndef DEBUG
132 DEFINES += -DNDEBUG
133 endif
134
135 # MetroWerks static Libraries
136 CLIB3S  = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
137 MATH3S  =
138 PLIB3S  = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
139
140 # MetroWerks Win32 build flags to create build tool
141 MWCW_MSL   = "$(METROWERKS)/MSL"
142 MWCW_W32   = "$(METROWERKS)/Win32-x86 Support"
143 WIN_CFLAGS =  -O2 -gccinc -nodefaults -proc 586 -w off
144 WIN_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
145 WIN_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
146
147 # Base compile flags
148 # and prefix or precompiled header added here.
149
150 # The default flags are as follows:
151 #
152 # -c                    compile only, no link
153 # -nosyspath            treat #include <...> like #include "..."
154 # -Cpp_exceptions off   disable C++ exceptions
155 # -RTTI off             disable C++ run-time typing information
156 # -align 4              align on 4 byte bounderies
157 # -w nocmdline          disable command-line driver/parser warnings
158 # -proc PII             generate code base on Pentium II instruction set
159 # -inst mmx             use MMX extensions (not used)
160
161 CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
162
163 # -g                    generate debugging information
164 # -O0                   level 0 optimizations
165
166 ifeq "$(RELEASE)" "debug"
167 CFLAGS += -g -O0
168 endif
169
170 # -O4,p                 level 4 optimizations, optimize for speed
171 ifeq "$(RELEASE)" "optimized"
172 CFLAGS += -O4,p
173 endif
174
175 # -prefix pre_nw.h      #include pre_nw.h for all files
176
177 CFLAGS += -prefix pre_nw.h
178
179
180 PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
181
182 #
183 # Declare major project deliverables output directories here
184 #
185
186 ifdef DEST
187 INSTALL = $(DEST)
188 ifeq (\, $(findstring \,$(INSTALL)))
189 INSTDIRS = $(DEST)
190 endif
191 endif
192
193 ifdef dest
194 INSTALL = $(dest)
195 ifeq (\, $(findstring \,$(INSTALL)))
196 INSTDIRS = $(dest)
197 endif
198 endif
199
200 ifndef INSTALL
201 INSTALL = $(AP_WORK)\Dist
202 INSTDIRS = $(AP_WORK)\Dist
203 endif
204
205 # Add support for building IPV6 alongside
206 ifneq "$(IPV6)" ""
207 DEFINES += -DNW_BUILD_IPV6
208 INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
209
210 ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
211 OBJDIR := $(OBJDIR)_IPV6
212 endif
213         
214 ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
215 INSTALL := $(INSTALL)_IPV6
216 endif        
217
218 ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
219 INSTDIRS := $(INSTDIRS)_IPV6
220 endif
221
222 endif
223
224 INSTDEVDIRS := \
225     $(INSTDIRS) \
226         $(INSTALL)\Apache2\include \
227         $(INSTALL)\Apache2\lib \
228
229 INSTDIRS += \
230         $(INSTALL)\Apache2 \
231         $(INSTALL)\Apache2\bin \
232         $(INSTALL)\Apache2\cgi-bin \
233         $(INSTALL)\Apache2\conf \
234         $(INSTALL)\Apache2\error \
235         $(INSTALL)\Apache2\htdocs \
236         $(INSTALL)\Apache2\icons \
237         $(INSTALL)\Apache2\logs \
238         $(INSTALL)\Apache2\man \
239         $(INSTALL)\Apache2\manual \
240         $(INSTALL)\Apache2\modules \
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 STDMOD          = $(AP_WORK)/modules
278 NWOS            = $(AP_WORK)/os/netware
279 SERVER          = $(AP_WORK)/server
280 SRC             = $(AP_WORK)
281 APR             = $(APR_WORK)
282 APRUTIL         = $(APU_WORK)
283 SUPMOD          = $(AP_WORK)/support
284 PCRE            = $(AP_WORK)/srclib/pcre
285 APRTEST         = $(APR_WORK)/test
286 HTTPD           = $(AP_WORK)/modules/http
287 XML             = $(APU_WORK)/xml
288
289 #
290 # Internal Libraries
291 #
292
293 APRLIB          = $(APR)/$(OBJDIR)/aprlib.lib
294 APRUTLIB        = $(APRUTIL)/$(OBJDIR)/aprutil.lib
295 STMODLIB        = $(STDMOD)/$(OBJDIR)/stdmod.lib
296 PCRELIB         = $(PCRE/$(OBJDIR)/pcre.lib
297 NWOSLIB         = $(NWOS)/$(OBJDIR)/netware.lib
298 SERVLIB         = $(SERVER)/$(OBJDIR)/server.lib
299 HTTPDLIB        = $(HTTPD)/$(OBJDIR)/httpd.lib
300 XMLLIB          = $(XML)/$(OBJDIR)/xmllib.lib
301
302 #
303 # Additional general defines
304 #
305
306 EnvironmentDefined = 1
307 endif # ifndef EnvironmentDefined
308
309 # This is always set so that it will show up in lower directories
310
311 ifdef Path
312 Path = $(PATH)
313 endif
314