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
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
114 NOVI = $(NOVELLLIBC)\imports
116 INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
117 ifneq "$(LDAPSDK)" ""
118 INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
124 # MetroWerks static Libraries
126 CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
128 PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
131 # and prefix or precompiled header added here.
133 # The default flags are as follows:
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
144 CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII -inst mmx
146 # -g generate debugging information
147 # -O0 level 0 optimizations
149 ifeq "$(RELEASE)" "debug"
153 # -O4,p level 4 optimizations, optimize for speed
154 ifeq "$(RELEASE)" "optimized"
158 # -prefix pre_nw.h #include pre_nw.h for all files
160 CFLAGS += -prefix pre_nw.h
163 PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
166 # Declare major project deliverables output directories here
171 ifeq (\, $(findstring \,$(INSTALL)))
178 ifeq (\, $(findstring \,$(INSTALL)))
184 INSTALL = $(AP_WORK)\Dist
185 INSTDIRS = $(AP_WORK)\Dist
188 # Add support for building IPV6 alongside
190 DEFINES += -DNW_BUILD_IPV6
191 INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
193 ifneq "$(IPV6)" "SET"
194 OBJDIR := $(OBJDIR)_IPV6
195 INSTALL := $(INSTALL)_IPV6
196 INSTDIRS := $(INSTDIRS)_IPV6
204 $(INSTALL)\Apache2\include \
205 $(INSTALL)\Apache2\lib \
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 \
221 # Declare Command and tool macros here
224 # Os2LibPath is an extra check to see if we are on NT
229 ifeq "$(OS)" "Windows_NT"
232 CHKNOT=cmd /C if not exist
234 DELTREE = cmd /C rd /s/q
238 CHK=command /C if exist
239 CHKNOT=command /C if not exist
246 # Setup base C compiler flags
253 STDMOD = $(AP_WORK)/modules
254 NWOS = $(AP_WORK)/os/netware
255 SERVER = $(AP_WORK)/server
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
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
279 # Additional general defines
283 EnvironmentDefined = 1
284 endif # ifndef EnvironmentDefined
286 # This is always set so that it will show up in lower directories