NWGNUmakefile revision 00d1c0c914426a97022d8205a875c48b211001c2
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# Declare the sub-directories to be built here
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeSUBDIRS = \
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye $(EOLIST)
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# Get the 'head' of the build environment. This includes default targets and
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# paths to tools
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbyeinclude $(AP_WORK)/build/NWGNUhead.inc
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# build this level's files
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# Make sure all needed macro's are defined
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# These directories will be at the beginning of the include list, followed by
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# INCDIRS
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikXINCDIRS += \
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye $(EOLIST)
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# These flags will come after CFLAGS
3bd91b9bbb9915421b772c357165fbc6fdeaf286Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeXCFLAGS += \
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye $(EOLIST)
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye#
7a147aeccd50900dc20ead611c17ab5728a1a6a6Jorgen Austvik# These defines will come after DEFINES
6336b638e9afd018de5f6c516eac4775d140fdaeJHKST#
6336b638e9afd018de5f6c516eac4775d140fdaeJHKSTXDEFINES += \
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye $(EOLIST)
6336b638e9afd018de5f6c516eac4775d140fdaeJHKST
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# These flags will be added to the link.opt file
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeXLFLAGS += \
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye $(EOLIST)
20c666f595e231740b3d6e0cee9348eec5befdd9Knut Anders Hatlen
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
6336b638e9afd018de5f6c516eac4775d140fdaeJHKST# These values will be appended to the correct variables based on the value of
6336b638e9afd018de5f6c516eac4775d140fdaeJHKST# RELEASE
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
5a4c3bef409b6a3c015b6e0a57e9ff79c6941e06Lubos Koscoifeq "$(RELEASE)" "debug"
5a4c3bef409b6a3c015b6e0a57e9ff79c6941e06Lubos KoscoXINCDIRS += \
3bd91b9bbb9915421b772c357165fbc6fdeaf286Trond Norbye $(EOLIST)
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond NorbyeXCFLAGS += \
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye $(EOLIST)
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye
4cbb84cb7daca3facdd991121b5a8ec50f1c4b56Knut Anders HatlenXDEFINES += \
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye $(EOLIST)
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick HigginsXLFLAGS += \
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins $(EOLIST)
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbyeendif
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higginsifeq "$(RELEASE)" "noopt"
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick HigginsXINCDIRS += \
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins $(EOLIST)
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins
9d25eb783c9ed2d047072934b15f178ab1c4d2acTrond NorbyeXCFLAGS += \
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins $(EOLIST)
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeXDEFINES += \
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye $(EOLIST)
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond NorbyeXLFLAGS += \
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye $(EOLIST)
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbyeendif
e96415d1881924946efa1caef7e8bdaec79cb92eKnut Anders Hatlen
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbyeifeq "$(RELEASE)" "release"
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond NorbyeXINCDIRS += \
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye $(EOLIST)
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeXCFLAGS += \
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen $(EOLIST)
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikXDEFINES += \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(EOLIST)
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikXLFLAGS += \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(EOLIST)
2aef10a5d2ebeaeb6b9cb6fed41933d19a76292fTrond Norbyeendif
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
3bd91b9bbb9915421b772c357165fbc6fdeaf286Trond Norbye#
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins# These are used by the link target if an NLM is being generated
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# This is used by the link 'name' directive to name the nlm. If left blank
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# TARGET_nlm (see below) will be used.
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikNLM_NAME =
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# This is used by the link '-desc ' directive.
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If left blank, NLM_NAME will be used.
85b96d2d336841c7cca62a39b2f6ba932af27435Jorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikNLM_DESCRIPTION =
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# This is used by the '-threadname' directive. If left blank,
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# NLM_NAME Thread will be used.
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikNLM_THREAD_NAME =
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If this is specified, it will override VERSION value in
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen# $(AP_WORK)/build/NWGNUenvironment.inc
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen#
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond NorbyeNLM_VERSION =
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond Norbye
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# If this is specified, it will override the default of 64K
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikNLM_STACK_SIZE =
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If this is specified it will be used by the link '-entry' directive
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikNLM_ENTRY_SYM =
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen#
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen# If this is specified it will be used by the link '-exit' directive
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikNLM_EXIT_SYM =
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
6336b638e9afd018de5f6c516eac4775d140fdaeJHKST# If this is specified it will be used by the link '-check' directive
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeNLM_CHECK_SYM =
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If these are specified it will be used by the link '-flags' directive
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders HatlenNLM_FLAGS =
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen#
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen# If this is specified it will be linked in with the XDCData option in the def
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen# by setting APACHE_UNIPROC in the environment
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen#
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders HatlenXDCDATA =
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If there is an NLM target, put it here
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikTARGET_nlm = \
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen $(OBJDIR)/mod_cach.nlm \
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen $(OBJDIR)/cach_dsk.nlm \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(OBJDIR)/socachdbm.nlm \
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen $(OBJDIR)/socachmem.nlm \
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen $(OBJDIR)/socachshmcb.nlm \
4a65b7ac38ba664d9c7bfb8960800d9980e2b95aKnut Anders Hatlen $(EOLIST)
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If there is an LIB target, put it here
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond NorbyeTARGET_lib = \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(EOLIST)
56c70b1779694ab3e83d294e3dcb839fe4374c97Patrick Higgins
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# These are the OBJ files needed to create the NLM target above.
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# Paths must all use the '/' character
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
6336b638e9afd018de5f6c516eac4775d140fdaeJHKSTFILES_nlm_objs = \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(EOLIST)
c46d1dd0142e57fd322de1f3288239f2ac215a46Trond Norbye
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye# These are the LIB files needed to create the NLM target above.
85b96d2d336841c7cca62a39b2f6ba932af27435Jorgen Austvik# These will be added as a library command in the link.opt file.
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
20e224bd98c217eb79e31b58f329df9f647abea3Trond NorbyeFILES_nlm_libs = \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(EOLIST)
ff5eba819da0cf7964d884630fb13262ef12c505Trond Norbye
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# These are the modules that the above NLM target depends on to load.
ff5eba819da0cf7964d884630fb13262ef12c505Trond Norbye# These will be added as a module command in the link.opt file.
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen AustvikFILES_nlm_modules = \
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik $(EOLIST)
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik
20c666f595e231740b3d6e0cee9348eec5befdd9Knut Anders Hatlen#
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik# If the nlm has a msg file, put it's path here
24f83cc2ee6e688179d6d289a3ddc508bb64009fJorgen Austvik#
b305c3e5d7fc952767ec752e151c23279cdb0f9cTrond NorbyeFILE_nlm_msg =
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye
bd90f270ab9b7a3f121b8db544a58ce1e4a465d1Trond Norbye#
# If the nlm has a hlp file put it's path here
#
FILE_nlm_hlp =
#
# If this is specified, it will override $(NWOS)\copyright.txt.
#
FILE_nlm_copyright =
#
# Any additional imports go here
#
FILES_nlm_Ximports = \
$(EOLIST)
#
# Any symbols exported to here
#
FILES_nlm_exports = \
$(EOLIST)
#
# These are the OBJ files needed to create the LIB target above.
# Paths must all use the '/' character
#
FILES_lib_objs = \
$(EOLIST)
#
# implement targets and dependancies (leave this section alone)
#
libs :: $(OBJDIR) $(TARGET_lib)
nlms :: libs $(TARGET_nlm)
#
# Updated this target to create necessary directories and copy files to the
# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
$(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/)
#
# Any specialized rules here
#
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
include $(APBUILD)/NWGNUtail.inc