NWGNUmakefile revision 553f11a8f542196fd02498006338dd33c64045c3
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# Declare the sub-directories to be built here
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaSUBDIRS = \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(EOLIST)
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# Get the 'head' of the build environment. This includes default targets and
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# paths to tools
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakovainclude $(AP_WORK)/build/NWGNUhead.inc
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova# build this level's files
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# Make sure all needed macro's are defined
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova#
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova#
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova# These directories will be at the beginning of the include list, followed by
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# INCDIRS
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina SojakovaXINCDIRS += \
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina Sojakova $(APR)/include \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova $(APRUTIL)/include \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(SRC)/include \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(STDMOD)/database \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(STDMOD)/http \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(STDMOD)/ssl \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(NWOS) \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova $(LUASRC)/src \
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova $(EOLIST)
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# These flags will come after CFLAGS
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaXCFLAGS += \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova -opt nointrinsics \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(EOLIST)
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova# These defines will come after DEFINES
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaXDEFINES += \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova -DLUA_COMPAT_ALL \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova $(EOLIST)
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova#
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova# These flags will be added to the link.opt file
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova#
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina SojakovaXLFLAGS += \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova -L$(OBJDIR) \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova $(EOLIST)
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova# These values will be appended to the correct variables based on the value of
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova# RELEASE
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakovaifeq "$(RELEASE)" "debug"
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaXINCDIRS += \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova $(EOLIST)
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaXCFLAGS += \
abd5fc85dc7e19b1614890182436940e922963a4Kristina Sojakova $(EOLIST)
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaXDEFINES += \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova $(EOLIST)
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaXLFLAGS += \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova $(EOLIST)
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakovaendif
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakovaifeq "$(RELEASE)" "noopt"
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaXINCDIRS += \
abd5fc85dc7e19b1614890182436940e922963a4Kristina Sojakova $(EOLIST)
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina SojakovaXCFLAGS += \
80d2ec8f37d5ddec13c14b17b1bab01e9c94630aChristian Maeder $(EOLIST)
80d2ec8f37d5ddec13c14b17b1bab01e9c94630aChristian Maeder
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina SojakovaXDEFINES += \
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova $(EOLIST)
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina SojakovaXLFLAGS += \
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova $(EOLIST)
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakovaendif
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakovaifeq "$(RELEASE)" "release"
abd5fc85dc7e19b1614890182436940e922963a4Kristina SojakovaXINCDIRS += \
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova $(EOLIST)
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina SojakovaXCFLAGS += \
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova $(EOLIST)
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina SojakovaXDEFINES += \
b3bacd257ffcdd346b70ab690f03b28ad5f33fdcKristina Sojakova $(EOLIST)
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina Sojakova
abd5fc85dc7e19b1614890182436940e922963a4Kristina SojakovaXLFLAGS += \
168d206b4e5fd436c98239a1b6629c651f54c8eeKristina Sojakova $(EOLIST)
80d2ec8f37d5ddec13c14b17b1bab01e9c94630aChristian Maederendif
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova#
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova# These are used by the link target if an NLM is being generated
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova# This is used by the link 'name' directive to name the nlm. If left blank
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova# TARGET_nlm (see below) will be used.
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova#
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina SojakovaNLM_NAME = mod_lua
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova#
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova# This is used by the link '-desc ' directive.
abd5fc85dc7e19b1614890182436940e922963a4Kristina Sojakova# If left blank, NLM_NAME will be used.
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova#
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina SojakovaNLM_DESCRIPTION = Apache $(VERSION_STR) LUA Module
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova#
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova# This is used by the '-threadname' directive. If left blank,
# NLM_NAME Thread will be used.
#
NLM_THREAD_NAME = LUA Module
#
# If this is specified, it will override VERSION value in
# $(AP_WORK)/build/NWGNUenvironment.inc
#
NLM_VERSION =
#
# If this is specified, it will override the default of 64K
#
NLM_STACK_SIZE = 131072
#
# If this is specified it will be used by the link '-entry' directive
#
NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
#
NLM_CHECK_SYM =
#
# If these are specified it will be used by the link '-flags' directive
#
NLM_FLAGS =
#
# If this is specified it will be linked in with the XDCData option in the def
# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
# by setting APACHE_UNIPROC in the environment
#
XDCDATA =
#
# If there is an NLM target, put it here
#
TARGET_nlm = \
$(OBJDIR)/$(NLM_NAME).nlm \
$(EOLIST)
#
# If there is an LIB target, put it here
#
TARGET_lib = \
$(OBJDIR)/lua.lib \
$(EOLIST)
#
# These are the OBJ files needed to create the NLM target above.
# Paths must all use the '/' character
#
FILES_nlm_objs = \
$(OBJDIR)/mod_lua.o \
$(OBJDIR)/lua_apr.o \
$(OBJDIR)/lua_config.o \
$(OBJDIR)/lua_passwd.o \
$(OBJDIR)/lua_request.o \
$(OBJDIR)/lua_vmprep.o \
$(OBJDIR)/lua_dbd.o \
$(EOLIST)
#
# These are the LIB files needed to create the NLM target above.
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
$(PRELUDE) \
$(OBJDIR)/lua.lib \
$(EOLIST)
#
# These are the modules that the above NLM target depends on to load.
# These will be added as a module command in the link.opt file.
#
FILES_nlm_modules = \
aprlib \
libc \
$(EOLIST)
#
# If the nlm has a msg file, put it's path here
#
FILE_nlm_msg =
#
# 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 = \
@aprlib.imp \
@httpd.imp \
@libc.imp \
$(EOLIST)
#
# Any symbols exported to here
#
FILES_nlm_exports = \
lua_module \
$(EOLIST)
#
# These are the OBJ files needed to create the LIB target above.
# Paths must all use the '/' character
#
UNWANTED = $(LUASRC)/src/lua.c $(LUASRC)/src/luac.c $(LUASRC)/src/print.c
FILES_lib_objs = \
$(patsubst $(LUASRC)/src/%.c,$(OBJDIR)/%.o, $(filter-out $(UNWANTED), $(wildcard $(LUASRC)/src/*.c))) \
$(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
#
vpath %.c $(LUASRC)/src
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
include $(APBUILD)/NWGNUtail.inc