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 NOVI = $(NOVELLLIBC)\imports
122 INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
123 ifneq "$(LDAPSDK)" ""
124 INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
126 ifneq "$(ZLIBSDK)" ""
127 INCDIRS := $(INCDIRS);$(ZLIBSDK)
135 # MetroWerks static Libraries
136 CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
138 PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
140 # MetroWerks Win32 build flags to create build tool
141 MWCW_MSL = "$(METROWERKS)/MSL"
142 MWCW_W32 = "$(METROWERKS)/Win32-x86 Support"
143 WIN_CFLAGS = -O2 -gccinc -nodefaults -proc 586 -w off
144 WIN_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
145 WIN_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
148 # and prefix or precompiled header added here.
150 # The default flags are as follows:
152 # -c compile only, no link
153 # -nosyspath treat #include <...> like #include "..."
154 # -Cpp_exceptions off disable C++ exceptions
155 # -RTTI off disable C++ run-time typing information
156 # -align 4 align on 4 byte bounderies
157 # -w nocmdline disable command-line driver/parser warnings
158 # -proc PII generate code base on Pentium II instruction set
159 # -inst mmx use MMX extensions (not used)
161 CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
163 # -g generate debugging information
164 # -O0 level 0 optimizations
166 ifeq "$(RELEASE)" "debug"
170 # -O4,p level 4 optimizations, optimize for speed
171 ifeq "$(RELEASE)" "optimized"
175 # -prefix pre_nw.h #include pre_nw.h for all files
177 CFLAGS += -prefix pre_nw.h
180 PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
183 # Declare major project deliverables output directories here
188 ifeq (\, $(findstring \,$(INSTALL)))
195 ifeq (\, $(findstring \,$(INSTALL)))
201 INSTALL = $(AP_WORK)\Dist
202 INSTDIRS = $(AP_WORK)\Dist
205 # Add support for building IPV6 alongside
207 DEFINES += -DNW_BUILD_IPV6
208 INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
210 ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
211 OBJDIR := $(OBJDIR)_IPV6
214 ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
215 INSTALL := $(INSTALL)_IPV6
218 ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
219 INSTDIRS := $(INSTDIRS)_IPV6
226 $(INSTALL)\Apache2\include \
227 $(INSTALL)\Apache2\lib \
231 $(INSTALL)\Apache2\bin \
232 $(INSTALL)\Apache2\cgi-bin \
233 $(INSTALL)\Apache2\conf \
234 $(INSTALL)\Apache2\error \
235 $(INSTALL)\Apache2\htdocs \
236 $(INSTALL)\Apache2\icons \
237 $(INSTALL)\Apache2\logs \
238 $(INSTALL)\Apache2\man \
239 $(INSTALL)\Apache2\manual \
240 $(INSTALL)\Apache2\modules \
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
277 STDMOD = $(AP_WORK)/modules
278 NWOS = $(AP_WORK)/os/netware
279 SERVER = $(AP_WORK)/server
282 APRUTIL = $(APU_WORK)
283 SUPMOD = $(AP_WORK)/support
284 PCRE = $(AP_WORK)/srclib/pcre
285 APRTEST = $(APR_WORK)/test
286 HTTPD = $(AP_WORK)/modules/http
287 XML = $(APU_WORK)/xml
293 APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
294 APRUTLIB = $(APRUTIL)/$(OBJDIR)/aprutil.lib
295 STMODLIB = $(STDMOD)/$(OBJDIR)/stdmod.lib
296 PCRELIB = $(PCRE/$(OBJDIR)/pcre.lib
297 NWOSLIB = $(NWOS)/$(OBJDIR)/netware.lib
298 SERVLIB = $(SERVER)/$(OBJDIR)/server.lib
299 HTTPDLIB = $(HTTPD)/$(OBJDIR)/httpd.lib
300 XMLLIB = $(XML)/$(OBJDIR)/xmllib.lib
303 # Additional general defines
306 EnvironmentDefined = 1
307 endif # ifndef EnvironmentDefined
309 # This is always set so that it will show up in lower directories