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