NWGNUmakefile revision 5716f9c6daa92dde5f2f9d11ed63f7c9549c223a
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbye# Define our required macro's if not already done.
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifndef AP_WORK
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeexport AP_WORK = $(CURDIR)
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifndef APR_WORK
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifeq "$(wildcard $(AP_WORK)/srclib/apr)" "$(AP_WORK)/srclib/apr"
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeexport APR_WORK = $(AP_WORK)/srclib/apr
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifneq "$(wildcard $(APR_WORK)/include/apr_version.h)" "$(APR_WORK)/include/apr_version.h"
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbye$(error APR_WORK does not point to a valid APR source tree)
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifndef APU_WORK
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifeq "$(wildcard $(AP_WORK)/srclib/apr-util)" "$(AP_WORK)/srclib/apr-util"
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeexport APU_WORK = $(AP_WORK)/srclib/apr-util
01f9a93a99959e8614f8ac3e0f41e17ce84184a7Knut Anders Hatlenifndef APU_WORK
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeifeq "$(wildcard $(APR_WORK)/include/apu_version.h)" "$(APR_WORK)/include/apu_version.h"
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeexport APU_WORK = $(APR_WORK)
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbyeifneq "$(wildcard $(APU_WORK)/include/apu_version.h)" "$(APU_WORK)/include/apu_version.h"
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbye$(error APU_WORK does not point to a valid APU source tree)
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner# Declare the sub-directories to be built here
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye $(APR_WORK) \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# Get the 'head' of the build environment. This includes default targets and
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# paths to tools
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbyeinclude $(AP_WORK)/build/NWGNUhead.inc
ef04451832b2553303ae511b4c09ed332eb4c06aKnut Anders Hatlen# build this level's files
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# Make sure all needed macro's are defined
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner# These directories will be at the beginning of the include list, followed by
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens ElknerXINCDIRS += \
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner $(APR)/include \
8247ba75ae77540a334b19527df7d963265c590bTrond Norbye $(APRUTIL)/include \
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner $(SRC)/include \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye $(STDMOD)/core \
f60d84bfe9ece4779c642dfe4849acd35ade9388Trond Norbye $(STDMOD)/filters \
f60d84bfe9ece4779c642dfe4849acd35ade9388Trond Norbye $(STDMOD)/generators \
3bd91b9bbb9915421b772c357165fbc6fdeaf286Trond Norbye $(STDMOD)/proxy \
bd4999e099547832430739402d07284e957f32ddTrond Norbye# These flags will come after CFLAGS
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye -DHAVE_CONFIG_H \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# These defines will come after DEFINES
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeXDEFINES += \
8247ba75ae77540a334b19527df7d963265c590bTrond Norbye# These flags will be added to the link.opt file
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner# These values will be appended to the correct variables based on the value of
bd4999e099547832430739402d07284e957f32ddTrond Norbyeifeq "$(RELEASE)" "debug"
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens ElknerXINCDIRS += \
bd4999e099547832430739402d07284e957f32ddTrond NorbyeXDEFINES += \
829364a12c7569fb058d84e5dbe0feabd1936212Jens Elknerifeq "$(RELEASE)" "noopt"
bd4999e099547832430739402d07284e957f32ddTrond Norbyeifeq "$(RELEASE)" "release"
bd4999e099547832430739402d07284e957f32ddTrond NorbyeXINCDIRS += \
bd4999e099547832430739402d07284e957f32ddTrond NorbyeXDEFINES += \
829364a12c7569fb058d84e5dbe0feabd1936212Jens Elkner# These are used by the link target if an NLM is being generated
829364a12c7569fb058d84e5dbe0feabd1936212Jens Elkner# This is used by the link 'name' directive to name the nlm. If left blank
829364a12c7569fb058d84e5dbe0feabd1936212Jens Elkner# TARGET_nlm (see below) will be used.
01f9a93a99959e8614f8ac3e0f41e17ce84184a7Knut Anders HatlenNLM_NAME = Apache2
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbye# This is used by the link '-desc ' directive.
8247ba75ae77540a334b19527df7d963265c590bTrond Norbye# If left blank, NLM_NAME will be used.
68a986af15f28e9fd0bdcac5af761097740b21aaJorgen AustvikNLM_DESCRIPTION = Apache Web Server $(VERSION_STR) $(VERSION_SKT)
68a986af15f28e9fd0bdcac5af761097740b21aaJorgen Austvik# This is used by the '-threadname' directive. If left blank,
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders Hatlen# NLM_NAME Thread will be used.
68a986af15f28e9fd0bdcac5af761097740b21aaJorgen AustvikNLM_THREAD_NAME = $(NLM_NAME)
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# This is used by the '-screenname' directive. If left blank,
68a986af15f28e9fd0bdcac5af761097740b21aaJorgen Austvik# 'Apache for NetWare' Thread will be used.
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeNLM_SCREEN_NAME = Apache $(VERSION_STR) for NetWare
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner# If this is specified, it will override VERSION value in
7b03878fed77297f29a4744cff129e11f7053681Trond NorbyeNLM_VERSION =
68a986af15f28e9fd0bdcac5af761097740b21aaJorgen Austvik# If this is specified, it will override the default of 64K
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders HatlenNLM_STACK_SIZE = 65536
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders Hatlen# If this is specified it will be used by the link '-entry' directive
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders HatlenNLM_ENTRY_SYM =
bd4999e099547832430739402d07284e957f32ddTrond Norbye# If this is specified it will be used by the link '-exit' directive
8247ba75ae77540a334b19527df7d963265c590bTrond NorbyeNLM_EXIT_SYM =
829364a12c7569fb058d84e5dbe0feabd1936212Jens Elkner# If this is specified it will be used by the link '-check' directive
f047d5a360b7e2a2d0f3f72611a1cee970baa6fcTrond NorbyeNLM_CHECK_SYM = _LibCCheckUnload
829364a12c7569fb058d84e5dbe0feabd1936212Jens Elkner# If these are specified it will be used by the link '-flags' directive
f047d5a360b7e2a2d0f3f72611a1cee970baa6fcTrond NorbyeNLM_FLAGS = PSEUDOPREEMPTION
8ea4b8d9796de43443cdf7b66e3f185aedf7b570Jens Elkner# If this is specified it will be linked in with the XDCData option in the def
bd4999e099547832430739402d07284e957f32ddTrond Norbye# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
bd4999e099547832430739402d07284e957f32ddTrond Norbye# by setting APACHE_UNIPROC in the environment
bd4999e099547832430739402d07284e957f32ddTrond Norbye# If there is an NLM target, put it here
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeTARGET_nlm = \
f047d5a360b7e2a2d0f3f72611a1cee970baa6fcTrond Norbye $(OBJDIR)/$(NLM_NAME).nlm \
998bdbc74fee32f35e3130fe3dbc332b06865b80Knut Anders Hatlen# If there is an LIB target, put it here
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders Hatlen# These are the OBJ files needed to create the NLM target above.
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders Hatlen# Paths must all use the '/' character
d5892f6c63fd9586a79b0d75228e5cbcf1dfd8c4Knut Anders HatlenFILES_nlm_objs = \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# Build in mod_nw_ssl if Winsock is being used
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbyeifndef USE_STDSOCKETS
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeFILES_nlm_objs += $(OBJDIR)/mod_nw_ssl.o \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# These are the LIB files needed to create the NLM target above.
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# These will be added as a library command in the link.opt file.
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeFILES_nlm_libs = \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye $(PCRELIB) \
21d1aaa1db4fde9bcad8256491ab72421651aa85Trond Norbye $(PRELUDE) \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# These are the modules that the above NLM target depends on to load.
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# These will be added as a module command in the link.opt file.
829364a12c7569fb058d84e5dbe0feabd1936212Jens ElknerFILES_nlm_modules = \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# If the nlm has a msg file, put it's path here
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeFILE_nlm_msg =
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# If the nlm has a hlp file put it's path here
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeFILE_nlm_hlp =
2aef10a5d2ebeaeb6b9cb6fed41933d19a76292fTrond Norbye# If this is specified, it will override $(NWOS)\copyright.txt.
f75cb11e9d95b4d9ec959f890eeab3c442215b24Trond NorbyeFILE_nlm_copyright =
2aef10a5d2ebeaeb6b9cb6fed41933d19a76292fTrond Norbye# Any additional imports go here
61910105f4f96902cf0a54ce28e84dc034c611f6Jorgen AustvikFILES_nlm_Ximports = \
1088c21d4f10d85cf7094adbd80c4b9697e833a9Dan Price GetCurrentAddressSpace \
5bb5351df1d00de040b15f5361d91b4e2c0bbde2Jorgen Austvik# Don't link with Winsock if standard sockets are being used
8739a8f4d16d06ac76f16ec8b80837cfd2448490Trond Norbyeifndef USE_STDSOCKETS
20a0bde399487a651cdeb66fc8b44b2212036355Trond NorbyeFILES_nlm_Ximports += @ws2nlm.imp \
7b03878fed77297f29a4744cff129e11f7053681Trond Norbye# Any symbols exported to here
8739a8f4d16d06ac76f16ec8b80837cfd2448490Trond NorbyeFILES_nlm_exports = \
20a0bde399487a651cdeb66fc8b44b2212036355Trond Norbye# These are the OBJ files needed to create the LIB target above.
cfb5c66ccd74f4bcab7168acea8daec98f1b39e7Jorgen Austvik# Paths must all use the '/' character
9088add4cb246b415c19479e94c10f0281d6c92fLubos Koscoifeq "$(wildcard $(PCRE)/pcre.c)" "$(PCRE)/pcre.c"
cfb5c66ccd74f4bcab7168acea8daec98f1b39e7Jorgen AustvikFILES_lib_objs = \
084d8d9422752d25f3cb527fa8fcf226cc004bc3Trond NorbyeFILES_lib_objs = \
$(OBJDIR)/pcre_version.o \
$(OBJDIR)/pcre_try_flipped.o \
# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
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
$(call COPY,docs/conf/magic, $(INSTALLBASE)/conf/)
$(call COPY,docs/conf/mime.types, $(INSTALLBASE)/conf/)
$(call COPY,docs/conf/charset.conv, $(INSTALLBASE)/conf/)
$(call MKCNF,docs/conf/extra/httpd-autoindex.conf.in, $(INSTALLBASE)/conf/extra/httpd-autoindex.conf)
$(call MKCNF,docs/conf/extra/httpd-languages.conf.in, $(INSTALLBASE)/conf/extra/httpd-languages.conf)
$(call MKCNF,docs/conf/extra/httpd-multilang-errordoc.conf.in, $(INSTALLBASE)/conf/extra/httpd-multilang-errordoc.conf)
$(call COPYR,docs/docroot, $(INSTALLBASE)/htdocs)
$(call COPYR,docs/error, $(INSTALLBASE)/error)
$(call COPYR,docs/icons, $(INSTALLBASE)/icons)
$(call COPYR,docs/man, $(INSTALLBASE)/man)
$(call COPYR,docs/manual, $(INSTALLBASE)/manual)
$(call COPY,$(STDMOD)/core/mod_so.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/core/mod_watchdog.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/cache/mod_cache.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/cache/cache_common.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/database/mod_dbd.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/dav/main/mod_dav.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/filters/mod_include.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/generators/mod_cgi.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/generators/mod_status.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/loggers/mod_log_config.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/mappers/mod_rewrite.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/proxy/mod_proxy.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/proxy/mod_serf.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/session/mod_session.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/ssl/mod_ssl.h, $(INSTALLBASE)/include/)
$(call COPY,$(STDMOD)/ssl/mod_ssl_openssl.h, $(INSTALLBASE)/include/)
include $(APBUILD)/NWGNUtail.inc
include $(APBUILD)/NWGNUscripts.inc