]> granicus.if.org Git - apache/blob - build/NWGNUenvironment.inc
Remove the hardcoded /Y parameter when doing a xcopy
[apache] / 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
119 NOVI    = $(NOVELLLIBC)\imports
120
121 INCDIRS         = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
122 ifneq "$(LDAPSDK)" ""
123 INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
124 endif
125 ifneq "$(ZLIBSDK)" ""
126 INCDIRS := $(INCDIRS);$(ZLIBSDK)
127 endif
128
129 DEFINES         = -DNETWARE
130
131 #
132 # MetroWerks static Libraries
133
134 CLIB3S  = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
135 MATH3S  =
136 PLIB3S  = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
137
138 # Base compile flags
139 # and prefix or precompiled header added here.
140
141 # The default flags are as follows:
142 #
143 # -c                    compile only, no link
144 # -nosyspath            treat #include <...> like #include "..."
145 # -Cpp_exceptions off   disable C++ exceptions
146 # -RTTI off             disable C++ run-time typing information
147 # -align 4              align on 4 byte bounderies
148 # -w nocmdline          disable command-line driver/parser warnings
149 # -proc PII             generate code base on Pentium II instruction set
150 # -inst mmx             use MMX extensions (Not used)
151
152 CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII 
153
154 # -g                    generate debugging information
155 # -O0                   level 0 optimizations
156
157 ifeq "$(RELEASE)" "debug"
158 CFLAGS += -g -O0
159 endif
160
161 # -O4,p                 level 4 optimizations, optimize for speed
162 ifeq "$(RELEASE)" "optimized"
163 CFLAGS += -O4,p
164 endif
165
166 # -prefix pre_nw.h      #include pre_nw.h for all files
167
168 CFLAGS += -prefix pre_nw.h
169
170
171 PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
172
173 #
174 # Declare major project deliverables output directories here
175 #
176
177 ifdef DEST
178 INSTALL = $(DEST)
179 ifeq (\, $(findstring \,$(INSTALL)))
180 INSTDIRS = $(DEST)
181 endif
182 endif
183
184 ifdef dest
185 INSTALL = $(dest)
186 ifeq (\, $(findstring \,$(INSTALL)))
187 INSTDIRS = $(dest)
188 endif
189 endif
190
191 ifndef INSTALL
192 INSTALL = $(AP_WORK)\Dist
193 INSTDIRS = $(AP_WORK)\Dist
194 endif
195
196 # Add support for building IPV6 alongside
197 ifneq "$(IPV6)" ""
198 DEFINES += -DNW_BUILD_IPV6
199 INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
200
201 ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
202 OBJDIR := $(OBJDIR)_IPV6
203 endif
204         
205 ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
206 INSTALL := $(INSTALL)_IPV6
207 endif        
208
209 ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
210 INSTDIRS := $(INSTDIRS)_IPV6
211 endif
212
213 endif
214
215 INSTDEVDIRS := \
216     $(INSTDIRS) \
217         $(INSTALL)\Apache2\include \
218         $(INSTALL)\Apache2\lib \
219
220 INSTDIRS += \
221         $(INSTALL)\Apache2 \
222         $(INSTALL)\Apache2\bin \
223         $(INSTALL)\Apache2\cgi-bin \
224         $(INSTALL)\Apache2\conf \
225         $(INSTALL)\Apache2\error \
226         $(INSTALL)\Apache2\htdocs \
227         $(INSTALL)\Apache2\icons \
228         $(INSTALL)\Apache2\logs \
229         $(INSTALL)\Apache2\man \
230         $(INSTALL)\Apache2\manual \
231         $(INSTALL)\Apache2\modules \
232
233 #
234 # Declare Command and tool macros here
235 #
236
237 # Os2LibPath is an extra check to see if we are on NT
238 ifdef Os2LibPath
239 OS = Windows_NT
240 endif
241
242 ifeq "$(OS)" "Windows_NT"
243 CMD=cmd /C
244 CHK=cmd /C if exist
245 CHKNOT=cmd /C if not exist
246 DEL = del /F
247 DELTREE = cmd /C rd /s/q
248 WINNT=1
249 XCOPYSW = /E
250 else
251 CMD=command /C
252 CHK=command /C if exist
253 CHKNOT=command /C if not exist
254 DEL = del
255 DELTREE = deltree /y
256 XCOPYSW = /E /Y
257 endif
258
259
260 #
261 # Setup base C compiler flags
262 #
263
264 #
265 # Common directories
266 #
267
268 STDMOD          = $(AP_WORK)/modules
269 NWOS            = $(AP_WORK)/os/netware
270 SERVER          = $(AP_WORK)/server
271 SRC                     = $(AP_WORK)
272 APR                     = $(AP_WORK)/srclib/apr
273 APRUTIL         = $(AP_WORK)/srclib/apr-util
274 SUPMOD          = $(AP_WORK)/support
275 PCRE            = $(AP_WORK)/srclib/pcre
276 APRTEST         = $(AP_WORK)/srclib/apr/test
277 HTTPD           = $(AP_WORK)/modules/http
278 XML                     = $(AP_WORK)/srclib/apr-util/xml
279
280 #
281 # Internal Libraries
282 #
283
284 APRLIB          = $(APR)/$(OBJDIR)/aprlib.lib
285 APRUTLIB        = $(APRUTIL)/$(OBJDIR)/aprutil.lib
286 STMODLIB        = $(STDMOD)/$(OBJDIR)/stdmod.lib
287 PCRELIB         = $(PCRE/$(OBJDIR)/pcre.lib
288 NWOSLIB         = $(NWOS)/$(OBJDIR)/netware.lib
289 SERVLIB         = $(SERVER)/$(OBJDIR)/server.lib
290 HTTPDLIB        = $(HTTPD)/$(OBJDIR)/httpd.lib
291 XMLLIB          = $(XML)/$(OBJDIR)/xmllib.lib
292
293 #
294 # Additional general defines
295 #
296
297 EnvironmentDefined = 1
298 endif # ifndef EnvironmentDefined
299
300 # This is always set so that it will show up in lower directories
301
302 ifdef Path
303 Path = $(PATH)
304 endif
305