NWGNUmakefile revision 0662ed52e814f8f08ef0e09956413a792584eddf
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen# Make sure all needed macro's are defined
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
a8fe899601735459641edae975c0fa08be8482e2Timo Sirainen
a8fe899601735459641edae975c0fa08be8482e2Timo Sirainen#
85144b5f0bc763de14c7d87291a90ef74ac241a2Timo Sirainen# Get the 'head' of the build environment if necessary. This includes default
85144b5f0bc763de14c7d87291a90ef74ac241a2Timo Sirainen# targets and paths to tools
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainenifndef EnvironmentDefined
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Siraineninclude $(AP_WORK)/build/NWGNUhead.inc
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenendif
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen# These directories will be at the beginning of the include list, followed by
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen# INCDIRS
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen#
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo SirainenXINCDIRS += \
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen $(APR)/include \
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen $(APRUTIL)/include \
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen $(AP_WORK)/include \
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen $(NWOS) \
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainen $(LDAPSDK)/inc \
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen $(EOLIST)
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen#
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen# These flags will come after CFLAGS
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo SirainenXCFLAGS += \
37a3ae182d3598807c066143a63a93ea7a0ab59dTimo Sirainen $(EOLIST)
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen# These defines will come after DEFINES
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo SirainenXDEFINES += \
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen $(EOLIST)
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#LDAP client requires the use of Winsock
ad48319996942463675b53877092ab7e13a7a75aTimo Sirainen#
ad48319996942463675b53877092ab7e13a7a75aTimo Sirainenifdef USE_STDSOCKETS
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo SirainenXDEFINES += -DUSE_WINSOCK \
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen $(EOLIST)
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenendif
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
7de1c472fd23ddac6b4dc5cbeee6fa6a8418b071Timo Sirainen# These flags will be added to the link.opt file
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo SirainenXLFLAGS += \
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen $(EOLIST)
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen# These values will be appended to the correct variables based on the value of
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen# RELEASE
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen#
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainenifeq "$(RELEASE)" "debug"
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo SirainenXINCDIRS += \
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen $(EOLIST)
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo SirainenXCFLAGS += \
7de1c472fd23ddac6b4dc5cbeee6fa6a8418b071Timo Sirainen $(EOLIST)
7de1c472fd23ddac6b4dc5cbeee6fa6a8418b071Timo Sirainen
7de1c472fd23ddac6b4dc5cbeee6fa6a8418b071Timo SirainenXDEFINES += \
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen $(EOLIST)
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo SirainenXLFLAGS += \
95a1a5195d56f3cf5d1e529aad668f87ad3b979bTimo Sirainen $(EOLIST)
923eb3dde28e4d8841c14fd6b4a69635b7070c3eTimo Sirainenendif
0ff139bf6c35ff615a2551e7e4f72a897e8a1341Timo Sirainen
ifeq "$(RELEASE)" "noopt"
XINCDIRS += \
$(EOLIST)
XCFLAGS += \
$(EOLIST)
XDEFINES += \
$(EOLIST)
XLFLAGS += \
$(EOLIST)
endif
ifeq "$(RELEASE)" "release"
XINCDIRS += \
$(EOLIST)
XCFLAGS += \
$(EOLIST)
XDEFINES += \
$(EOLIST)
XLFLAGS += \
$(EOLIST)
endif
#
# These are used by the link target if an NLM is being generated
# This is used by the link 'name' directive to name the nlm. If left blank
# TARGET_nlm (see below) will be used.
#
NLM_NAME = utilldap
#
# This is used by the link '-desc ' directive.
# If left blank, NLM_NAME will be used.
#
NLM_DESCRIPTION = Apache $(VERSION_STR) LDAP Authentication Module
#
# This is used by the '-threadname' directive. If left blank,
# NLM_NAME Thread will be used.
#
NLM_THREAD_NAME = UtilLDAP 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 = 8192
#
# 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)/utilldap.nlm \
$(EOLIST)
#
# If there is an LIB target, put it here
#
TARGET_lib = \
$(EOLIST)
#
# These are the OBJ files needed to create the NLM target above.
# Paths must all use the '/' character
#
FILES_nlm_objs = \
$(OBJDIR)/util_ldap.o \
$(OBJDIR)/util_ldap_cache.o \
$(OBJDIR)/util_ldap_cache_mgr.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 = \
libcpre.o \
$(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 \
lldapsdk \
lldapssl \
$(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 = \
@$(APR)/aprlib.imp \
@$(NWOS)/httpd.imp \
@libc.imp \
@$(LDAPSDK)/imports/lldapsdk.imp \
@$(LDAPSDK)/imports/lldapssl.imp \
$(EOLIST)
#
# Any symbols exported to here
#
FILES_nlm_exports = \
ldap_module \
$(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, $(INSTALL)/$(BASEDIR)/modules/)
#
# Any specialized rules here
#
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
include $(APBUILD)/NWGNUtail.inc