2
# Setup needed Tools and Libraries
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
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
48
METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
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
58
# Set the Release type that you want to build, possible values are:
60
# debug - full debug switches are set
61
# noopt - normal switches are set (default)
62
# optimized - optimization switches are set
92
ifeq "$(RELEASE)" "debug"
96
ifeq "$(RELEASE)" "noopt"
100
ifeq "$(RELEASE)" "optimized"
105
# Setup compiler information
108
# MetroWerks NLM tools
112
LIB = mwldnlm -type library -w nocmdline
115
ifndef USE_STDSOCKETS
120
NOVI = $(NOVELLLIBC)\imports
122
INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
125
ifndef USE_STDSOCKETS
126
DEFINES += -DUSE_WINSOCK
133
# MetroWerks static Libraries
135
CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
137
PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
140
# and prefix or precompiled header added here.
142
# The default flags are as follows:
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)
153
CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
155
# -g generate debugging information
156
# -O0 level 0 optimizations
158
ifeq "$(RELEASE)" "debug"
162
# -O4,p level 4 optimizations, optimize for speed
163
ifeq "$(RELEASE)" "optimized"
167
# -prefix apr_arch_pre_nw.h #include pre_nw.h for all files
169
CFLAGS += -prefix apr_arch_pre_nw.h
172
PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
175
# Declare major project deliverables output directories here
180
ifeq (\, $(findstring \,$(INSTALL)))
187
ifeq (\, $(findstring \,$(INSTALL)))
193
INSTALL = $(APR_WORK)\Dist
194
INSTDIRS = $(APR_WORK)\Dist
197
# Add support for building IPV6 alongside
199
DEFINES += -DNW_BUILD_IPV6
200
INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
202
ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
203
OBJDIR := $(OBJDIR)_IPV6
206
ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
207
INSTALL := $(INSTALL)_IPV6
210
ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
211
INSTDIRS := $(INSTDIRS)_IPV6
217
INSTALLBASE := $(INSTALL)\Apache2
222
$(INSTALLBASE)\include \
229
INSTALLBASE := $(INSTALL)\apr
234
$(INSTALLBASE)\include \
243
# Declare Command and tool macros here
246
# Os2LibPath is an extra check to see if we are on NT
251
ifeq "$(OS)" "Windows_NT"
254
CHKNOT=cmd /C if not exist
256
DELTREE = cmd /C rd /s/q
261
CHK=command /C if exist
262
CHKNOT=command /C if not exist
270
# Setup base C compiler flags
278
APRTEST = $(APR_WORK)/test
279
APRUTIL = $(APU_WORK)
280
APULDAP = $(APU_WORK)/ldap
287
APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
288
APRUTLIB = $(APRUTIL)/$(OBJDIR)/aprutil.lib
289
APULDAPLIB = $(APULDAP)/$(OBJDIR)/apuldap.lib
290
XMLLIB = $(XML)/$(OBJDIR)/xmllib.lib
293
# Additional general defines
296
EnvironmentDefined = 1
297
endif # ifndef EnvironmentDefined
299
# This is always set so that it will show up in lower directories