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
122 # Define minimum APR version to check for
126 ifndef USE_STDSOCKETS
131 NOVI = $(NOVELLLIBC)\imports
133 INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
134 ifneq "$(LDAPSDK)" ""
135 INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
137 ifneq "$(ZLIBSDK)" ""
138 INCDIRS := $(INCDIRS);$(ZLIBSDK)
142 ifndef USE_STDSOCKETS
143 DEFINES += -DUSE_WINSOCK
150 VERSION_SKT = (BSDSOCK)
152 VERSION_SKT = (WINSOCK)
156 # MetroWerks static Libraries
158 CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
160 PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
163 # and prefix or precompiled header added here.
165 # The default flags are as follows:
167 # -c compile only, no link
168 # -nosyspath treat #include <...> like #include "..."
169 # -Cpp_exceptions off disable C++ exceptions
170 # -RTTI off disable C++ run-time typing information
171 # -align 4 align on 4 byte bounderies
172 # -w nocmdline disable command-line driver/parser warnings
173 # -proc PII generate code base on Pentium II instruction set
174 # -inst mmx use MMX extensions (Not used)
176 CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
178 # -g generate debugging information
179 # -O0 level 0 optimizations
181 ifeq "$(RELEASE)" "debug"
185 # -O4,p level 4 optimizations, optimize for speed
186 ifeq "$(RELEASE)" "optimized"
190 # -prefix pre_nw.h #include pre_nw.h for all files
192 CFLAGS += -prefix pre_nw.h
195 PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
198 # Declare major project deliverables output directories here
203 ifeq (\, $(findstring \,$(INSTALL)))
210 ifeq (\, $(findstring \,$(INSTALL)))
216 INSTALL = $(AP_WORK)\Dist
217 INSTDIRS = $(AP_WORK)\Dist
233 # Add support for building IPV6 alongside
235 DEFINES += -DNW_BUILD_IPV6
236 INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
238 ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
239 OBJDIR := $(OBJDIR)_IPV6
242 ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
243 INSTALL := $(INSTALL)_IPV6
246 ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
247 INSTDIRS := $(INSTDIRS)_IPV6
254 $(INSTALL)\$(BASEDIR)\include \
255 $(INSTALL)\$(BASEDIR)\lib \
258 $(INSTALL)\$(BASEDIR) \
259 $(INSTALL)\$(BASEDIR)\bin \
260 $(INSTALL)\$(BASEDIR)\cgi-bin \
261 $(INSTALL)\$(BASEDIR)\conf \
262 $(INSTALL)\$(BASEDIR)\error \
263 $(INSTALL)\$(BASEDIR)\htdocs \
264 $(INSTALL)\$(BASEDIR)\icons \
265 $(INSTALL)\$(BASEDIR)\logs \
266 $(INSTALL)\$(BASEDIR)\man \
267 $(INSTALL)\$(BASEDIR)\manual \
268 $(INSTALL)\$(BASEDIR)\modules \
271 # Declare Command and tool macros here
274 # Os2LibPath is an extra check to see if we are on NT
279 ifeq "$(OS)" "Windows_NT"
292 CHK = $(CMD) if exist
293 CHKNOT = $(CMD) if not exist
297 # Setup base C compiler flags
304 STDMOD = $(AP_WORK)/modules
305 NWOS = $(AP_WORK)/os/netware
306 SERVER = $(AP_WORK)/server
309 APRUTIL = $(APU_WORK)
310 APULDAP = $(APU_WORK)/ldap
311 SUPMOD = $(AP_WORK)/support
312 PCRE = $(AP_WORK)/srclib/pcre
313 APRTEST = $(APR_WORK)/test
314 HTTPD = $(AP_WORK)/modules/http
315 XML = $(APU_WORK)/xml
316 PREBUILD_INST = $(AP_WORK)\nwprebuild
322 APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
323 APRUTLIB = $(APRUTIL)/$(OBJDIR)/aprutil.lib
324 APULDAPLIB = $(APULDAP)/$(OBJDIR)/apuldap.lib
325 STMODLIB = $(STDMOD)/$(OBJDIR)/stdmod.lib
326 PCRELIB = $(PCRE)/$(OBJDIR)/pcre.lib
327 NWOSLIB = $(NWOS)/$(OBJDIR)/netware.lib
328 SERVLIB = $(SERVER)/$(OBJDIR)/server.lib
329 HTTPDLIB = $(HTTPD)/$(OBJDIR)/httpd.lib
330 XMLLIB = $(XML)/$(OBJDIR)/xmllib.lib
333 # Additional general defines
336 EnvironmentDefined = 1
337 endif # ifndef EnvironmentDefined
339 # This is always set so that it will show up in lower directories