NWGNUmakefile revision 16b55a35cff91315d261d1baa776138af465c4e4
47693af92e50a1ad81825eb01b7157a211269613mx# Declare the sub-directories to be built here
47693af92e50a1ad81825eb01b7157a211269613mxSUBDIRS = \
47693af92e50a1ad81825eb01b7157a211269613mx# Get the 'head' of the build environment. This includes default targets and
47693af92e50a1ad81825eb01b7157a211269613mx# paths to tools
47693af92e50a1ad81825eb01b7157a211269613mxinclude $(AP_WORK)\build\NWGNUhead.inc
47693af92e50a1ad81825eb01b7157a211269613mx# build this level's files
47693af92e50a1ad81825eb01b7157a211269613mx# Make sure all needed macro's are defined
d635b452b5b58e50f0c67983f4a57a04deefce77Winson Wang - Sun Microsystems - Beijing China# These directories will be at the beginning of the include list, followed by
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXINCDIRS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx $(APR)/include \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx $(APRUTIL)/include \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx $(AP_WORK)/include \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These flags will come after CFLAGS
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXCFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These defines will come after DEFINES
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXDEFINES += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These flags will be added to the link.opt file
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXLFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These values will be appended to the correct variables based on the value of
6f3e57ac9d0b054c3169579f3422080b8ba10105mxifeq "$(RELEASE)" "debug"
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXINCDIRS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXCFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXDEFINES += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXLFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxifeq "$(RELEASE)" "noopt"
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXINCDIRS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXCFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXDEFINES += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXLFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxifeq "$(RELEASE)" "release"
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXINCDIRS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXCFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXDEFINES += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mxXLFLAGS += \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These are used by the link target if an NLM is being generated
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# This is used by the link 'name' directive to name the nlm. If left blank
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# TARGET_nlm (see below) will be used.
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_NAME = echo
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# This is used by the link '-desc ' directive.
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If left blank, NLM_NAME will be used.
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_DESCRIPTION = Apache $(VERSION_STR) Echo Module
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# This is used by the '-threadname' directive. If left blank,
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# NLM_NAME Thread will be used.
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_THREAD_NAME = Echo Module
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified, it will override VERSION value in
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# $(AP_WORK)\build\NWGNUenvironment.inc
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_VERSION =
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified, it will override the default of 64K
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_STACK_SIZE = 8192
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified it will be used by the link '-entry' directive
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_ENTRY_SYM = _LibCPrelude
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified it will be used by the link '-exit' directive
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_EXIT_SYM = _LibCPostlude
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified it will be used by the link '-check' directive
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_CHECK_SYM =
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If these are specified it will be used by the link '-flags' directive
6f3e57ac9d0b054c3169579f3422080b8ba10105mxNLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified it will be linked in with the XDCData option in the def
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# by setting APACHE_UNIPROC in the environment
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If there is an NLM target, put it here
6f3e57ac9d0b054c3169579f3422080b8ba10105mxTARGET_nlm = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx $(OBJDIR)/echo.nlm \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If there is an LIB target, put it here
6f3e57ac9d0b054c3169579f3422080b8ba10105mxTARGET_lib = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These are the OBJ files needed to create the NLM target above.
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Paths must all use the '/' character
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILES_nlm_objs = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx $(OBJDIR)/mod_echo.o \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These are the LIB files needed to create the NLM target above.
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These will be added as a library command in the link.opt file.
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILES_nlm_libs = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These are the modules that the above NLM target depends on to load.
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These will be added as a module command in the link.opt file.
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILES_nlm_modules = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If the nlm has a msg file, put it's path here
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILE_nlm_msg =
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If the nlm has a hlp file put it's path here
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILE_nlm_hlp =
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# If this is specified, it will override $(NWOS)\copyright.txt.
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILE_nlm_copyright =
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Any additional imports go here
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILES_nlm_Ximports = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Any symbols exported to here
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILES_nlm_exports = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx echo_module \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# These are the OBJ files needed to create the LIB target above.
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Paths must all use the '/' character
6f3e57ac9d0b054c3169579f3422080b8ba10105mxFILES_lib_objs = \
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# implement targets and dependancies (leave this section alone)
6f3e57ac9d0b054c3169579f3422080b8ba10105mxlibs :: $(OBJDIR) $(TARGET_lib)
6f3e57ac9d0b054c3169579f3422080b8ba10105mxnlms :: libs $(TARGET_nlm)
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Updated this target to create necessary directories and copy files to the
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples)
6f3e57ac9d0b054c3169579f3422080b8ba10105mxinstall :: nlms FORCE
6f3e57ac9d0b054c3169579f3422080b8ba10105mx copy $(OBJDIR)\*.nlm $(INSTALL)\$(BASEDIR)\modules\*.*
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Any specialized rules here
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# Include the 'tail' makefile that has targets that depend on variables defined
6f3e57ac9d0b054c3169579f3422080b8ba10105mx# in this makefile
6f3e57ac9d0b054c3169579f3422080b8ba10105mxinclude $(AP_WORK)\build\NWGNUtail.inc