NWGNUuserdir revision 0662ed52e814f8f08ef0e09956413a792584eddf
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#
5cd4555ad444fd391002ae32450572054369fd42Rob Austein# Make sure all needed macro's are defined
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
5c6b95ba1b2e35f8dd6b0a7f25aacba91fff3aa2Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Get the 'head' of the build environment if necessary. This includes default
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# targets and paths to tools
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellingtonifndef EnvironmentDefined
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellingtoninclude $(AP_WORK)/build/NWGNUhead.inc
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewsendif
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# These directories will be at the beginning of the include list, followed by
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# INCDIRS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark AndrewsXINCDIRS += \
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington $(APR)/include \
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews $(APRUTIL)/include \
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt $(AP_WORK)/include \
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews $(AP_WORK)/modules/http \
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(NWOS) \
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(EOLIST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# These flags will come after CFLAGS
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonXCFLAGS += \
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(EOLIST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# These defines will come after DEFINES
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinXDEFINES += \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(EOLIST)
141132c272ebc41da4c55d69c49810fafadbbc11Mark Andrews
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews#
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updater# These flags will be added to the link.opt file
20f2d1d74b67d096f858dc70cedf9af6dcc38dc7Automatic Updater#
339d2a4d4b3b2e0be9e43afec6e84fe468edfaeeAutomatic UpdaterXLFLAGS += \
3b398443f0dca316ba7a6e057ba2d1b8ab4ddf70Tinderbox User $(EOLIST)
5c6b95ba1b2e35f8dd6b0a7f25aacba91fff3aa2Tinderbox User
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# These values will be appended to the correct variables based on the value of
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# RELEASE
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinifeq "$(RELEASE)" "debug"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinXINCDIRS += \
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews $(EOLIST)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinXCFLAGS += \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(EOLIST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonXDEFINES += \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(EOLIST)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonXLFLAGS += \
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(EOLIST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtonendif
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtonifeq "$(RELEASE)" "noopt"
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonXINCDIRS += \
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews $(EOLIST)
bca7f81db58d4803fb6d8d352132445cf61eb1acMark Andrews
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonXCFLAGS += \
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson $(EOLIST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsXDEFINES += \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(EOLIST)
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt
c5223c9cb7c22620d5ee6611228673e95b48a270Mark AndrewsXLFLAGS += \
2047977ce2dfcfe3a0fa2d638c3242841310fad3Mark Andrews $(EOLIST)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrewsendif
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark Andrews
4d9f3f00d93fcb8743b1105e8cf82e862be220d1Mark Andrewsifeq "$(RELEASE)" "release"
f30785f506a522ed6a5e394af2bb13b6f883927eEvan HuntXINCDIRS += \
4025076ca2822fc420830c97eb6597294a5a1faaFrancis Dupont $(EOLIST)
3d17a3ba61a303d5c4d9867068d0fbe9f24d2988Mark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsXCFLAGS += \
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark Andrews $(EOLIST)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
26bb3b7a67b833f0a18072567de036226890ca1aMark AndrewsXDEFINES += \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(EOLIST)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsXLFLAGS += \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(EOLIST)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsendif
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# These are used by the link target if an NLM is being generated
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# This is used by the link 'name' directive to name the nlm. If left blank
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# TARGET_nlm (see below) will be used.
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsNLM_NAME = userdir
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# This is used by the link '-desc ' directive.
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# If left blank, NLM_NAME will be used.
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt#
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsNLM_DESCRIPTION = Apache $(VERSION_STR) User Dir Module
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# This is used by the '-threadname' directive. If left blank,
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt# NLM_NAME Thread will be used.
3d17a3ba61a303d5c4d9867068d0fbe9f24d2988Mark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsNLM_THREAD_NAME = UserDir Module
43efd9fa56b03e3e285fb58859efc9348c7f4a9fMark Andrews
26bb3b7a67b833f0a18072567de036226890ca1aMark Andrews#
43efd9fa56b03e3e285fb58859efc9348c7f4a9fMark Andrews# If this is specified, it will override VERSION value in
d0aebc5a55b6145297d94f8aee939852357c59fcMark Andrews# $(AP_WORK)/build/NWGNUenvironment.inc
508f61f8d699c46f962b682f388e54b446a7194dMark Andrews#
38397492000c996d50f9bf96a4da318a742bd07cEvan HuntNLM_VERSION =
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# If this is specified, it will override the default of 64K
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonNLM_STACK_SIZE = 8192
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# If this is specified it will be used by the link '-entry' directive
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNLM_ENTRY_SYM =
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# If this is specified it will be used by the link '-exit' directive
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsNLM_EXIT_SYM =
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# If this is specified it will be used by the link '-check' directive
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
8b9fc7617b8f54641708c985697848e6cc10a5bbMark AndrewsNLM_CHECK_SYM =
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
728a9bec1fe3a56fedfd672e7f34d2d82631d1d7Mark Andrews# If these are specified it will be used by the link '-flags' directive
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonNLM_FLAGS =
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# If this is specified it will be linked in with the XDCData option in the def
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# by setting APACHE_UNIPROC in the environment
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinXDCDATA =
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# If there is an NLM target, put it here
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonTARGET_nlm = \
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(OBJDIR)/userdir.nlm \
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews $(EOLIST)
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews#
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews# If there is an LIB target, put it here
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews#
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark AndrewsTARGET_lib = \
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews $(EOLIST)
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# These are the OBJ files needed to create the NLM target above.
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# Paths must all use the '/' character
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinFILES_nlm_objs = \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(OBJDIR)/mod_userdir.o \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(EOLIST)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# These are the LIB files needed to create the NLM target above.
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson# These will be added as a library command in the link.opt file.
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinFILES_nlm_libs = \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein libcpre.o \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(EOLIST)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# These are the modules that the above NLM target depends on to load.
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson# These will be added as a module command in the link.opt file.
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafsson#
7791dd06ea69d0fb2494788ad4c24d568f40bcdfMark AndrewsFILES_nlm_modules = \
e9359db5e958bf05f9b9c5fe3c27d533f0f05550Mark Andrews aprlib \
7791dd06ea69d0fb2494788ad4c24d568f40bcdfMark Andrews libc \
7791dd06ea69d0fb2494788ad4c24d568f40bcdfMark Andrews $(EOLIST)
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt#
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt# If the nlm has a msg file, put it's path here
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt#
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan HuntFILE_nlm_msg =
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt#
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt# If the nlm has a hlp file put it's path here
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt#
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan HuntFILE_nlm_hlp =
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt#
578e3196076b409c509c6c0a0873e7bfe54f4d61Evan Hunt# If this is specified, it will override $(NWOS)\copyright.txt.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
7791dd06ea69d0fb2494788ad4c24d568f40bcdfMark AndrewsFILE_nlm_copyright =
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
7791dd06ea69d0fb2494788ad4c24d568f40bcdfMark Andrews#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# Any additional imports go here
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinFILES_nlm_Ximports = \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein @$(APR)/aprlib.imp \
f9f11eb54be19b7deedf3978496f71d81432a5eeJeremy Reed @$(NWOS)/httpd.imp \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein @libc.imp \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(EOLIST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews# Any symbols exported to here
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark AndrewsFILES_nlm_exports = \
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews userdir_module \
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews $(EOLIST)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews#
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews# These are the OBJ files needed to create the LIB target above.
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews# Paths must all use the '/' character
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark AndrewsFILES_lib_objs = \
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews $(EOLIST)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews# implement targets and dependancies (leave this section alone)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrewslibs :: $(OBJDIR) $(TARGET_lib)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrewsnlms :: libs $(TARGET_nlm)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews# Updated this target to create necessary directories and copy files to the
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrewsinstall :: nlms FORCE
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews# Any specialized rules here
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews#
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews# Include the 'tail' makefile that has targets that depend on variables defined
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews# in this makefile
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews#
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrewsinclude $(APBUILD)/NWGNUtail.inc
2c15fcdeac4c2402258867fbac24d7475ef98259Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews