NWGNUmakefile revision 16b55a35cff91315d261d1baa776138af465c4e4
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Declare the sub-directories to be built here
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Get the 'head' of the build environment. This includes default targets and
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# paths to tools
44aae046c38e796e581110b7ecdf4478167d684dBob Halleyinclude $(AP_WORK)\build\NWGNUhead.inc
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# build this level's files
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Make sure all needed macro's are defined
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These directories will be at the beginning of the include list, followed by
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyXINCDIRS += \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(APR)/include \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(APRUTIL)/include \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(AP_WORK)/include \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King $(LUASRC)/src \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King# These flags will come after CFLAGS
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King -opt nointrinsics \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King# These defines will come after DEFINES
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam KingXDEFINES += \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King# These flags will be added to the link.opt file
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King -L$(OBJDIR) \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King# These values will be appended to the correct variables based on the value of
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam Kingifeq "$(RELEASE)" "debug"
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam KingXINCDIRS += \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam KingXDEFINES += \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam Kingifeq "$(RELEASE)" "noopt"
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam KingXINCDIRS += \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam KingXDEFINES += \
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam Kingifeq "$(RELEASE)" "release"
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam KingXINCDIRS += \
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyXDEFINES += \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These are used by the link target if an NLM is being generated
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# This is used by the link 'name' directive to name the nlm. If left blank
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# TARGET_nlm (see below) will be used.
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_NAME = mod_lua
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# This is used by the link '-desc ' directive.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If left blank, NLM_NAME will be used.
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_DESCRIPTION = Apache $(VERSION_STR) LUA Module
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# This is used by the '-threadname' directive. If left blank,
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# NLM_NAME Thread will be used.
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_THREAD_NAME = LUA Module
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified, it will override VERSION value in
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# $(AP_WORK)\build\NWGNUenvironment.inc
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_VERSION =
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified, it will override the default of 64K
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_STACK_SIZE = 8192
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified it will be used by the link '-entry' directive
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_ENTRY_SYM = _LibCPrelude
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified it will be used by the link '-exit' directive
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_EXIT_SYM = _LibCPostlude
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified it will be used by the link '-check' directive
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_CHECK_SYM =
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If these are specified it will be used by the link '-flags' directive
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyNLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified it will be linked in with the XDCData option in the def
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# by setting APACHE_UNIPROC in the environment
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If there is an NLM target, put it here
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyTARGET_nlm = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(OBJDIR)/$(NLM_NAME).nlm \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If there is an LIB target, put it here
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyTARGET_lib = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These are the OBJ files needed to create the NLM target above.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Paths must all use the '/' character
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILES_nlm_objs = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These are the LIB files needed to create the NLM target above.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These will be added as a library command in the link.opt file.
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILES_nlm_libs = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These are the modules that the above NLM target depends on to load.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These will be added as a module command in the link.opt file.
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILES_nlm_modules = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If the nlm has a msg file, put it's path here
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILE_nlm_msg =
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If the nlm has a hlp file put it's path here
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILE_nlm_hlp =
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# If this is specified, it will override $(NWOS)\copyright.txt.
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILE_nlm_copyright =
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Any additional imports go here
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILES_nlm_Ximports = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Any symbols exported to here
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILES_nlm_exports = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley lua_module \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# These are the OBJ files needed to create the LIB target above.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Paths must all use the '/' character
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyUNWANTED = $(LUASRC)/src/lua.c $(LUASRC)/src/luac.c $(LUASRC)/src/print.c
44aae046c38e796e581110b7ecdf4478167d684dBob HalleyFILES_lib_objs = \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(patsubst $(LUASRC)/src/%.c,$(OBJDIR)/%.o, $(filter-out $(UNWANTED), $(wildcard $(LUASRC)/src/*.c))) \
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# implement targets and dependancies (leave this section alone)
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam Kinglibs :: $(OBJDIR) $(TARGET_lib)
44aae046c38e796e581110b7ecdf4478167d684dBob Halleynlms :: libs $(TARGET_nlm)
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Updated this target to create necessary directories and copy files to the
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples)
44aae046c38e796e581110b7ecdf4478167d684dBob Halleyinstall :: nlms FORCE
44aae046c38e796e581110b7ecdf4478167d684dBob Halley copy $(OBJDIR)\*.nlm $(INSTALL)\$(BASEDIR)\modules\*.*
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Any specialized rules here
44aae046c38e796e581110b7ecdf4478167d684dBob Halleyvpath %.c $(LUASRC)/src
23768c88a770c1960b2f38ff01f43ab6420311ccWilliam King# Include the 'tail' makefile that has targets that depend on variables defined
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# in this makefile
44aae046c38e796e581110b7ecdf4478167d684dBob Halleyinclude $(AP_WORK)\build\NWGNUtail.inc