fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Make sure all needed macro's are defined
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgOSSLINC = $(OSSLSDK)/outinc_nw_libc
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgOSSLLIB = $(OSSLSDK)/out_nw_libc
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgOSSLAPP = $(OSSLSDK)/apps
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Get the 'head' of the build environment if necessary. This includes default
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# targets and paths to tools
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgifndef EnvironmentDefined
0662ed52e814f8f08ef0e09956413a792584eddffuankginclude $(AP_WORK)/build/NWGNUhead.inc
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(SERFSRC) \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(SERFSRC)/buckets \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(ZLIBSDK) \
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankgifeq "$(wildcard $(SERFSRC)/incoming.c)" "$(SERFSRC)/incoming.c"
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankg $(SERFSRC)/auth \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These directories will be at the beginning of the include list, followed by
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXINCDIRS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(V_PATH) \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(OSSLINC) \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(OSSLINC)/openssl \
16b55a35cff91315d261d1baa776138af465c4e4fuankg $(APR)/include \
16b55a35cff91315d261d1baa776138af465c4e4fuankg $(APRUTIL)/include \
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg $(SRC)/include \
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg $(STDMOD)/http \
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg $(STDMOD)/generators \
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg $(STDMOD)/ssl \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These flags will come after CFLAGS
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXCFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg -relax_pointers \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These defines will come after DEFINES
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXDEFINES += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg -DHAVE_SERF_H \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg -DHAVE_OPENSSL \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These flags will be added to the link.opt file
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXLFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg -l $(OSSLLIB) \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These values will be appended to the correct variables based on the value of
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgifeq "$(RELEASE)" "debug"
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXINCDIRS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXCFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXDEFINES += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXLFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgifeq "$(RELEASE)" "noopt"
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXINCDIRS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXCFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXDEFINES += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXLFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgifeq "$(RELEASE)" "release"
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXINCDIRS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXCFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXDEFINES += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgXLFLAGS += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These are used by the link target if an NLM is being generated
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# This is used by the link 'name' directive to name the nlm. If left blank
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# TARGET_nlm (see below) will be used.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgNLM_NAME = serf
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# This is used by the link '-desc ' directive.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If left blank, NLM_NAME will be used.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgNLM_DESCRIPTION = Apache $(VERSION_STR) Serf Module
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# This is used by the '-threadname' directive. If left blank,
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# NLM_NAME Thread will be used.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgNLM_THREAD_NAME = Serf Module
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified, it will override VERSION value in
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgNLM_VERSION =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified, it will override the default of 64K
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgNLM_STACK_SIZE = 8192
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified it will be used by the link '-entry' directive
0662ed52e814f8f08ef0e09956413a792584eddffuankgNLM_ENTRY_SYM =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified it will be used by the link '-exit' directive
0662ed52e814f8f08ef0e09956413a792584eddffuankgNLM_EXIT_SYM =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified it will be used by the link '-check' directive
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgNLM_CHECK_SYM =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If these are specified it will be used by the link '-flags' directive
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified it will be linked in with the XDCData option in the def
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# by setting APACHE_UNIPROC in the environment
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If there is an NLM target, put it here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgTARGET_nlm = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(OBJDIR)/$(NLM_NAME).nlm \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If there is an LIB target, put it here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgTARGET_lib = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These are the OBJ files needed to create the NLM target above.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Paths must all use the '/' character
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_objs = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Build serf from source
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_objs += \
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankgifeq "$(wildcard $(SERFSRC)/incoming.c)" "$(SERFSRC)/incoming.c"
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankgifeq "$(wildcard $(SERFSRC)/buckets/iovec_buckets.c)" "$(SERFSRC)/buckets/iovec_buckets.c"
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankgFILES_nlm_objs += \
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankg $(OBJDIR)/auth.o \
d8f29761bcc1bee1e1c5013d3473f8328ec247cdfuankgifeq "$(wildcard $(SERFSRC)/buckets/response_body_buckets.c)" "$(SERFSRC)/buckets/response_body_buckets.c"
d8f29761bcc1bee1e1c5013d3473f8328ec247cdfuankgFILES_nlm_objs += \
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankg$(error This libserf version is broken for NetWare platform!)
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Build zlib from source
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_objs += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_objs += \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These are the LIB files needed to create the NLM target above.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These will be added as a library command in the link.opt file.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_libs = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(OSSLLIB)/crypto.lib \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg $(OSSLLIB)/ssl.lib \
cf7ca2f9eaa6523fefcccba4287b91637391fb51fuankg $(PRELUDE) \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These are the modules that the above NLM target depends on to load.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These will be added as a module command in the link.opt file.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_modules = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If the nlm has a msg file, put it's path here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILE_nlm_msg =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If the nlm has a hlp file put it's path here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILE_nlm_hlp =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# If this is specified, it will override $(NWOS)\copyright.txt.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILE_nlm_copyright =
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Any additional imports go here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_Ximports = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg GetProcessSwitchCount \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg RunningProcess \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg GetSuperHighResolutionTimer \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Don't link with Winsock if standard sockets are being used
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgifndef USE_STDSOCKETS
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_Ximports += @ws2nlm.imp \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Any symbols exported to here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_nlm_exports = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg serf_module \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# These are the OBJ files needed to create the LIB target above.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Paths must all use the '/' character
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgFILES_lib_objs = \
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# implement targets and dependancies (leave this section alone)
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankglibs :: $(OBJDIR) $(TARGET_lib)
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgnlms :: libs $(TARGET_nlm)
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Updated this target to create necessary directories and copy files to the
0662ed52e814f8f08ef0e09956413a792584eddffuankg# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankginstall :: nlms FORCE
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Any specialized rules here
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankgvpath %.c $(V_PATH)
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# Include the 'tail' makefile that has targets that depend on variables defined
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg# in this makefile
0662ed52e814f8f08ef0e09956413a792584eddffuankginclude $(APBUILD)/NWGNUtail.inc