2
# Setup needed Tools and Libraries
5
ifeq "$(wildcard $(AP_WORK)\NWGNUcustom.ini)" "$(AP_WORK)\NWGNUcustom.ini"
6
include $(AP_WORK)\NWGNUcustom.ini
7
CUSTOM_INI = $(AP_WORK)\NWGNUcustom.ini
15
# Treat like an include
17
ifndef EnvironmentDefined
20
# simple macros for parsing makefiles
25
SPACE := $(EMPTY) $(EMPTY)
31
# Try and handle case issues
34
NOVELLLIBC = $(NovellLibC)
39
NOVELLLIBC = C:/novell/ndk/libc
42
# This is a placeholder
44
# LDAPSDK = C:/novell/ndk/cldapsdk
47
# This is a placeholder
49
# ZLIBSDK = C:/novell/ndk/zlibsdk
53
METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
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
63
# Set the Release type that you want to build, possible values are:
65
# debug - full debug switches are set
66
# noopt - normal switches are set (default)
67
# optimized - optimization switches are set
97
ifeq "$(RELEASE)" "debug"
101
ifeq "$(RELEASE)" "noopt"
105
ifeq "$(RELEASE)" "optimized"
110
# Setup compiler information
113
# MetroWerks NLM tools
117
LIB = mwldnlm -type library -w nocmdline
120
ifndef USE_STDSOCKETS
125
NOVI = $(NOVELLLIBC)\imports
127
INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
128
ifneq "$(LDAPSDK)" ""
129
INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
131
ifneq "$(ZLIBSDK)" ""
132
INCDIRS := $(INCDIRS);$(ZLIBSDK)
136
ifndef USE_STDSOCKETS
137
DEFINES += -DUSE_WINSOCK
144
# MetroWerks static Libraries
146
CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
148
PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
151
# and prefix or precompiled header added here.
153
# The default flags are as follows:
155
# -c compile only, no link
156
# -nosyspath treat #include <...> like #include "..."
157
# -Cpp_exceptions off disable C++ exceptions
158
# -RTTI off disable C++ run-time typing information
159
# -align 4 align on 4 byte bounderies
160
# -w nocmdline disable command-line driver/parser warnings
161
# -proc PII generate code base on Pentium II instruction set
162
# -inst mmx use MMX extensions (Not used)
164
CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
166
# -g generate debugging information
167
# -O0 level 0 optimizations
169
ifeq "$(RELEASE)" "debug"
173
# -O4,p level 4 optimizations, optimize for speed
174
ifeq "$(RELEASE)" "optimized"
178
# -prefix pre_nw.h #include pre_nw.h for all files
180
CFLAGS += -prefix pre_nw.h
183
PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
186
# Declare major project deliverables output directories here
191
ifeq (\, $(findstring \,$(INSTALL)))
198
ifeq (\, $(findstring \,$(INSTALL)))
204
INSTALL = $(AP_WORK)\Dist
205
INSTDIRS = $(AP_WORK)\Dist
208
# Add support for building IPV6 alongside
210
DEFINES += -DNW_BUILD_IPV6
211
INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
213
ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
214
OBJDIR := $(OBJDIR)_IPV6
217
ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
218
INSTALL := $(INSTALL)_IPV6
221
ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
222
INSTDIRS := $(INSTDIRS)_IPV6
229
$(INSTALL)\Apache2\include \
230
$(INSTALL)\Apache2\lib \
234
$(INSTALL)\Apache2\bin \
235
$(INSTALL)\Apache2\cgi-bin \
236
$(INSTALL)\Apache2\conf \
237
$(INSTALL)\Apache2\error \
238
$(INSTALL)\Apache2\htdocs \
239
$(INSTALL)\Apache2\icons \
240
$(INSTALL)\Apache2\logs \
241
$(INSTALL)\Apache2\man \
242
$(INSTALL)\Apache2\manual \
243
$(INSTALL)\Apache2\modules \
246
# Declare Command and tool macros here
249
# Os2LibPath is an extra check to see if we are on NT
254
ifeq "$(OS)" "Windows_NT"
257
CHKNOT=cmd /C if not exist
259
DELTREE = cmd /C rd /s/q
264
CHK=command /C if exist
265
CHKNOT=command /C if not exist
273
# Setup base C compiler flags
280
STDMOD = $(AP_WORK)/modules
281
NWOS = $(AP_WORK)/os/netware
282
SERVER = $(AP_WORK)/server
285
APRUTIL = $(APU_WORK)
286
APULDAP = $(APU_WORK)/ldap
287
SUPMOD = $(AP_WORK)/support
288
PCRE = $(AP_WORK)/srclib/pcre
289
APRTEST = $(APR_WORK)/test
290
HTTPD = $(AP_WORK)/modules/http
291
XML = $(APU_WORK)/xml
292
PREBUILD_INST = $(AP_WORK)\nwprebuild
298
APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
299
APRUTLIB = $(APRUTIL)/$(OBJDIR)/aprutil.lib
300
APULDAPLIB = $(APULDAP)/$(OBJDIR)/apuldap.lib
301
STMODLIB = $(STDMOD)/$(OBJDIR)/stdmod.lib
302
PCRELIB = $(PCRE)/$(OBJDIR)/pcre.lib
303
NWOSLIB = $(NWOS)/$(OBJDIR)/netware.lib
304
SERVLIB = $(SERVER)/$(OBJDIR)/server.lib
305
HTTPDLIB = $(HTTPD)/$(OBJDIR)/httpd.lib
306
XMLLIB = $(XML)/$(OBJDIR)/xmllib.lib
309
# Additional general defines
312
EnvironmentDefined = 1
313
endif # ifndef EnvironmentDefined
315
# This is always set so that it will show up in lower directories