2 # Define our required macro's if not already done.
6 export AP_WORK = $(CURDIR)
10 ifeq "$(wildcard $(AP_WORK)/srclib/apr)" "$(AP_WORK)/srclib/apr"
11 export APR_WORK = $(AP_WORK)/srclib/apr
14 ifneq "$(wildcard $(APR_WORK)/include/apr_version.h)" "$(APR_WORK)/include/apr_version.h"
15 $(error APR_WORK does not point to a valid APR source tree)
19 ifeq "$(wildcard $(AP_WORK)/srclib/apr-util)" "$(AP_WORK)/srclib/apr-util"
20 export APU_WORK = $(AP_WORK)/srclib/apr-util
24 ifeq "$(wildcard $(APR_WORK)/include/apu_version.h)" "$(APR_WORK)/include/apu_version.h"
25 export APU_WORK = $(APR_WORK)
28 ifneq "$(wildcard $(APU_WORK)/include/apu_version.h)" "$(APU_WORK)/include/apu_version.h"
29 $(error APU_WORK does not point to a valid APU source tree)
33 # Declare the sub-directories to be built here
44 # Get the 'head' of the build environment. This includes default targets and
48 include $(AP_WORK)/build/NWGNUhead.inc
51 # build this level's files
54 # Make sure all needed macro's are defined
58 # These directories will be at the beginning of the include list, followed by
68 $(STDMOD)/generators \
75 $(SERVER)/mpm/netware \
81 # These flags will come after CFLAGS
88 # These defines will come after DEFINES
94 # These flags will be added to the link.opt file
100 # These values will be appended to the correct variables based on the value of
103 ifeq "$(RELEASE)" "debug"
117 ifeq "$(RELEASE)" "noopt"
131 ifeq "$(RELEASE)" "release"
146 # These are used by the link target if an NLM is being generated
147 # This is used by the link 'name' directive to name the nlm. If left blank
148 # TARGET_nlm (see below) will be used.
153 # This is used by the link '-desc ' directive.
154 # If left blank, NLM_NAME will be used.
156 NLM_DESCRIPTION = Apache Web Server $(VERSION_STR) $(VERSION_SKT)
159 # This is used by the '-threadname' directive. If left blank,
160 # NLM_NAME Thread will be used.
162 NLM_THREAD_NAME = $(NLM_NAME)
165 # This is used by the '-screenname' directive. If left blank,
166 # 'Apache for NetWare' Thread will be used.
168 NLM_SCREEN_NAME = Apache $(VERSION_STR) for NetWare
172 # If this is specified, it will override VERSION value in
173 # $(AP_WORK)/build/NWGNUenvironment.inc
178 # If this is specified, it will override the default of 64K
180 NLM_STACK_SIZE = 65536
184 # If this is specified it will be used by the link '-entry' directive
189 # If this is specified it will be used by the link '-exit' directive
194 # If this is specified it will be used by the link '-check' directive
196 NLM_CHECK_SYM = _LibCCheckUnload
199 # If these are specified it will be used by the link '-flags' directive
201 NLM_FLAGS = PSEUDOPREEMPTION
204 # If this is specified it will be linked in with the XDCData option in the def
205 # file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
206 # by setting APACHE_UNIPROC in the environment
211 # If there is an NLM target, put it here
214 $(OBJDIR)/$(NLM_NAME).nlm \
218 # If there is an LIB target, put it here
225 # These are the OBJ files needed to create the NLM target above.
226 # Paths must all use the '/' character
229 $(OBJDIR)/apreq_cookie.o \
230 $(OBJDIR)/apreq_error.o \
231 $(OBJDIR)/apreq_module.o \
232 $(OBJDIR)/apreq_module_cgi.o \
233 $(OBJDIR)/apreq_module_custom.o \
234 $(OBJDIR)/apreq_param.o \
235 $(OBJDIR)/apreq_parser.o \
236 $(OBJDIR)/apreq_parser_header.o \
237 $(OBJDIR)/apreq_parser_multipart.o \
238 $(OBJDIR)/apreq_parser_urlencoded.o \
239 $(OBJDIR)/apreq_util.o \
240 $(OBJDIR)/buildmark.o \
242 $(OBJDIR)/connection.o \
244 $(OBJDIR)/core_filters.o \
245 $(OBJDIR)/eoc_bucket.o \
246 $(OBJDIR)/eor_bucket.o \
247 $(OBJDIR)/error_bucket.o \
248 $(OBJDIR)/http_core.o \
249 $(OBJDIR)/http_protocol.o \
250 $(OBJDIR)/http_request.o \
251 $(OBJDIR)/byterange_filter.o \
252 $(OBJDIR)/chunk_filter.o \
253 $(OBJDIR)/http_etag.o \
254 $(OBJDIR)/http_filters.o \
258 $(OBJDIR)/mod_authn_core.o \
259 $(OBJDIR)/mod_authz_core.o \
260 $(OBJDIR)/mod_authz_host.o \
261 $(OBJDIR)/mod_alias.o \
262 $(OBJDIR)/mod_dir.o \
263 $(OBJDIR)/mod_env.o \
264 $(OBJDIR)/mod_include.o \
265 $(OBJDIR)/mod_log_config.o \
266 $(OBJDIR)/mod_mime.o \
267 $(OBJDIR)/mod_negotiation.o \
268 $(OBJDIR)/mod_netware.o \
269 $(OBJDIR)/mod_setenvif.o \
271 $(OBJDIR)/mod_watchdog.o \
272 $(OBJDIR)/modules.o \
273 $(OBJDIR)/mpm_common.o \
274 $(OBJDIR)/mpm_netware.o \
275 $(OBJDIR)/protocol.o \
276 $(OBJDIR)/provider.o \
277 $(OBJDIR)/request.o \
278 $(OBJDIR)/scoreboard.o \
280 $(OBJDIR)/util_cfgtree.o \
281 $(OBJDIR)/util_charset.o \
282 $(OBJDIR)/util_cookies.o \
283 $(OBJDIR)/util_debug.o \
284 $(OBJDIR)/util_expr_eval.o \
285 $(OBJDIR)/util_expr_parse.o \
286 $(OBJDIR)/util_expr_scan.o \
287 $(OBJDIR)/util_filter.o \
288 $(OBJDIR)/util_md5.o \
289 $(OBJDIR)/util_mutex.o \
290 $(OBJDIR)/util_nw.o \
291 $(OBJDIR)/util_pcre.o \
292 $(OBJDIR)/util_regex.o \
293 $(OBJDIR)/util_script.o \
294 $(OBJDIR)/util_time.o \
295 $(OBJDIR)/util_xml.o \
299 # Build in mod_nw_ssl if Winsock is being used
300 ifndef USE_STDSOCKETS
301 FILES_nlm_objs += $(OBJDIR)/mod_nw_ssl.o \
306 # These are the LIB files needed to create the NLM target above.
307 # These will be added as a library command in the link.opt file.
315 # These are the modules that the above NLM target depends on to load.
316 # These will be added as a module command in the link.opt file.
318 FILES_nlm_modules = \
324 # If the nlm has a msg file, put it's path here
329 # If the nlm has a hlp file put it's path here
334 # If this is specified, it will override $(NWOS)\copyright.txt.
339 # Any additional imports go here
341 FILES_nlm_Ximports = \
345 GetCurrentAddressSpace \
348 # Don't link with Winsock if standard sockets are being used
349 ifndef USE_STDSOCKETS
350 FILES_nlm_Ximports += @ws2nlm.imp \
355 # Any symbols exported to here
357 FILES_nlm_exports = \
362 # These are the OBJ files needed to create the LIB target above.
363 # Paths must all use the '/' character
365 ifeq "$(wildcard $(PCRE)/pcre.c)" "$(PCRE)/pcre.c"
374 $(OBJDIR)/chartables.o \
375 $(OBJDIR)/pcre_compile.o \
376 $(OBJDIR)/pcre_exec.o \
377 $(OBJDIR)/pcre_fullinfo.o \
378 $(OBJDIR)/pcre_globals.o \
379 $(OBJDIR)/pcre_newline.o \
380 $(OBJDIR)/pcre_tables.o \
381 $(OBJDIR)/pcre_version.o \
383 ifeq "$(wildcard $(PCRE)/pcre_try_flipped.c)" "$(PCRE)/pcre_try_flipped.c"
385 $(OBJDIR)/pcre_try_flipped.o \
392 # implement targets and dependancies (leave this section alone)
395 libs :: $(OBJDIR) $(TARGET_lib)
397 nlms :: libs $(TARGET_nlm)
400 # Updated this target to create necessary directories and copy files to the
401 # correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
403 MKCNF = $(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -v SSLPORT=$(SSLPORT) -v MODSSL=$(WITH_SSL) -v BSDSKT=$(USE_STDSOCKETS) -f build/mkconfNW.awk $1 > $2
405 install :: nlms instscripts FORCE
406 $(call COPY,$(OBJDIR)/$(NLM_NAME).nlm, $(INSTALLBASE)/)
407 $(call COPY,ABOUT_APACHE, $(INSTALLBASE)/)
408 $(call COPY,CHANGES, $(INSTALLBASE)/)
409 $(call COPY,LICENSE, $(INSTALLBASE)/)
410 $(call COPY,README, $(INSTALLBASE)/)
411 $(call COPY,VERSIONING, $(INSTALLBASE)/)
412 $(call COPY,STATUS, $(INSTALLBASE)/)
413 $(call COPY,support/dbmmanage.in, $(INSTALLBASE)/bin/dbmmanage.pl)
414 $(call COPY,support/logresolve.pl.in, $(INSTALLBASE)/bin/logresolve.pl)
415 $(call COPY,support/split-logfile.in, $(INSTALLBASE)/bin/split-logfile.pl)
416 $(call COPY,support/check_forensic, $(INSTALLBASE)/bin/check_forensic.sh)
417 $(call COPY,docs/conf/magic, $(INSTALLBASE)/conf/)
418 $(call COPY,docs/conf/mime.types, $(INSTALLBASE)/conf/)
419 $(call COPY,docs/conf/charset.conv, $(INSTALLBASE)/conf/)
420 $(call COPY,docs/cgi-examples/printenv, $(INSTALLBASE)/cgi-bin/printenv.pl)
421 $(call MKCNF,docs/conf/httpd.conf.in, $(INSTALLBASE)/conf/httpd.conf)
422 $(call MKCNF,docs/conf/extra/httpd-autoindex.conf.in, $(INSTALLBASE)/conf/extra/httpd-autoindex.conf)
423 $(call MKCNF,docs/conf/extra/httpd-dav.conf.in, $(INSTALLBASE)/conf/extra/httpd-dav.conf)
424 $(call MKCNF,docs/conf/extra/httpd-default.conf.in, $(INSTALLBASE)/conf/extra/httpd-default.conf)
425 $(call MKCNF,docs/conf/extra/httpd-info.conf.in, $(INSTALLBASE)/conf/extra/httpd-info.conf)
426 $(call MKCNF,docs/conf/extra/httpd-languages.conf.in, $(INSTALLBASE)/conf/extra/httpd-languages.conf)
427 $(call MKCNF,docs/conf/extra/httpd-manual.conf.in, $(INSTALLBASE)/conf/extra/httpd-manual.conf)
428 $(call MKCNF,docs/conf/extra/httpd-mpm.conf.in, $(INSTALLBASE)/conf/extra/httpd-mpm.conf)
429 $(call MKCNF,docs/conf/extra/httpd-multilang-errordoc.conf.in, $(INSTALLBASE)/conf/extra/httpd-multilang-errordoc.conf)
430 $(call MKCNF,docs/conf/extra/httpd-userdir.conf.in, $(INSTALLBASE)/conf/extra/httpd-userdir.conf)
431 $(call MKCNF,docs/conf/extra/httpd-vhosts.conf.in, $(INSTALLBASE)/conf/extra/httpd-vhosts.conf)
432 $(call MKCNF,docs/conf/extra/httpd-policy.conf.in, $(INSTALLBASE)/conf/extra/httpd-policy.conf)
433 $(call MKCNF,docs/conf/extra/httpd-ssl.conf.in, $(INSTALLBASE)/conf/extra/httpd-ssl.conf)
434 $(call MKCNF,docs/conf/extra/proxy-html.conf.in, $(INSTALLBASE)/conf/extra/proxy-html.conf)
435 $(call COPYR,docs/docroot, $(INSTALLBASE)/htdocs)
436 $(call COPYR,docs/error, $(INSTALLBASE)/error)
437 $(call COPYR,docs/icons, $(INSTALLBASE)/icons)
438 $(call COPYR,docs/man, $(INSTALLBASE)/man)
439 $(call COPYR,docs/manual, $(INSTALLBASE)/manual)
442 $(call COPY,$(SRC)/include/*.h, $(INSTALLBASE)/include/)
443 $(call COPY,$(NWOS)/*.h, $(INSTALLBASE)/include/)
444 $(call COPY,$(APR)/include/*.h, $(INSTALLBASE)/include/)
445 $(call COPY,$(APRUTIL)/include/*.h, $(INSTALLBASE)/include/)
446 $(call COPY,$(STDMOD)/core/mod_so.h, $(INSTALLBASE)/include/)
447 $(call COPY,$(STDMOD)/core/mod_watchdog.h, $(INSTALLBASE)/include/)
448 $(call COPY,$(STDMOD)/cache/mod_cache.h, $(INSTALLBASE)/include/)
449 $(call COPY,$(STDMOD)/database/mod_dbd.h, $(INSTALLBASE)/include/)
450 $(call COPY,$(STDMOD)/dav/main/mod_dav.h, $(INSTALLBASE)/include/)
451 $(call COPY,$(STDMOD)/filters/mod_include.h, $(INSTALLBASE)/include/)
452 $(call COPY,$(STDMOD)/generators/mod_cgi.h, $(INSTALLBASE)/include/)
453 $(call COPY,$(STDMOD)/generators/mod_status.h, $(INSTALLBASE)/include/)
454 $(call COPY,$(STDMOD)/loggers/mod_log_config.h, $(INSTALLBASE)/include/)
455 $(call COPY,$(STDMOD)/mappers/mod_rewrite.h, $(INSTALLBASE)/include/)
456 $(call COPY,$(STDMOD)/proxy/mod_proxy.h, $(INSTALLBASE)/include/)
457 $(call COPY,$(STDMOD)/proxy/mod_serf.h, $(INSTALLBASE)/include/)
458 $(call COPY,$(STDMOD)/session/mod_session.h, $(INSTALLBASE)/include/)
459 $(call COPY,$(STDMOD)/ssl/mod_ssl.h, $(INSTALLBASE)/include/)
460 $(call COPY,$(APR)/*.imp, $(INSTALLBASE)/lib/)
461 $(call COPY,$(NWOS)/*.imp, $(INSTALLBASE)/lib/)
462 $(call COPY,$(NWOS)/*.xdc, $(INSTALLBASE)/lib/)
463 $(call COPY,$(APBUILD)/NWGNU*.inc, $(INSTALLBASE)/build/)
466 $(MAKE) -C $(SERVER) -f NWGNUmakefile
467 $(MAKE) -C $(PCRE) -f NWGNUmakefile
468 $(call MKDIR,$(PREBUILD_INST))
469 $(call COPY,$(SERVER)/$(OBJDIR)/*.nlm, $(PREBUILD_INST)/)
470 $(call COPY,$(PCRE)/$(OBJDIR)/*.nlm, $(PREBUILD_INST)/)
473 # Any specialized rules here
476 vpath %.c server:modules/arch/netware:modules/http:modules/aaa:modules/mappers
477 vpath %.c modules/generators:modules/metadata:modules/filters:modules/loggers
478 vpath %.c modules/core:os/netware:server/mpm/netware:$(PCRE)
480 $(OBJDIR)/chartables.o: os/netware/chartables.c
483 # Include the 'tail' makefile that has targets that depend on variables defined
487 include $(APBUILD)/NWGNUtail.inc
489 include $(APBUILD)/NWGNUscripts.inc