NWGNUab revision 8ffac2c334103c0336602aaede650cb578611151
012a352f4b26cfd874db8d06debc495c2303e8b2Bob Halley#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# Get the 'head' of the build environment if necessary. This includes default
50722c0d550a63d4a2b8f34e907b693a81d864e0Mark Andrews# targets and paths to tools
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleyifndef EnvironmentDefined
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleyinclude $(AP_WORK)/build/NWGNUhead.inc
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleyendif
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# build this level's files
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Make sure all needed macro's are defined
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewsifeq "$(WITH_ABS)" "1"
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrewsifeq "$(USE_NTLS)" "1"
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid LawrenceSSL_INC = $(NTLSSDK)/inc
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleySSL_LIB = $(NTLSSDK)/imp
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleySSL_BIN = $(NTLSSDK)/bin
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleySSL_APP = $(NTLSSDK)/apps
460b427411b72da26b1836b9424e2e70d65d9394David Lawrenceifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(warning '$(NTLSSDK)' does NOT point to a valid NTLS SDK!)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendif
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyelse
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleySSL_INC = $(OSSLSDK)/outinc_nw_libc
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleySSL_LIB = $(OSSLSDK)/out_nw_libc
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleySSL_BIN = $(OSSLSDK)/out_nw_libc
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleySSL_APP = $(OSSLSDK)/apps
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(warning '$(OSSLSDK)' does NOT point to a valid OpenSSL SDK!)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendif
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyendif
460b427411b72da26b1836b9424e2e70d65d9394David Lawrenceifeq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceHAVE_OPENSSL = 1
460b427411b72da26b1836b9424e2e70d65d9394David Lawrenceendif
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendif
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence#
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence# These directories will be at the beginning of the include list, followed by
fcb54ce0a4f7377486df5bec83b3aa4711bf4131Mark Andrews# INCDIRS
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence#
460b427411b72da26b1836b9424e2e70d65d9394David Lawrenceifdef HAVE_OPENSSL
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceXINCDIRS += \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence $(SSL_INC) \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence $(SSL_INC)/openssl \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrenceendif
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceXINCDIRS += \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence $(NWOS) \
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews $(AP_WORK)/include \
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews $(APR)/include \
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews $(APRUTIL)/include \
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews $(APR)/misc/netware \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence#
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence# These flags will come after CFLAGS
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence#
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceXCFLAGS += \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence $(EOLIST)
596912ee9ca8eb14d30707ec286ab5d28bd39b3eMark Andrews
8319af16557b81eba3277ee67215285f0823b587Mark Andrews#
8319af16557b81eba3277ee67215285f0823b587Mark Andrews# These defines will come after DEFINES
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews#
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrenceifdef HAVE_OPENSSL
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceXDEFINES += \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence -DHAVE_OPENSSL \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence $(EOLIST)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
c32b87bc54abacf95fb3b063d72b7d1855c1643bMichael Graff#
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence# These flags will be added to the link.opt file
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence#
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceXLFLAGS += \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence -l $(SSL_LIB) \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence $(EOLIST)
460b427411b72da26b1836b9424e2e70d65d9394David Lawrenceendif
b719aabd6be52278f2cc426581179f3f3af36e20Mark Andrews
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrews# These values will be appended to the correct variables based on the value of
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrews# RELEASE
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyifeq "$(RELEASE)" "debug"
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXINCDIRS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXCFLAGS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXDEFINES += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXLFLAGS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendif
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyifeq "$(RELEASE)" "noopt"
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXINCDIRS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXCFLAGS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0014d6342b0d50ae37126ac16d5bf821d02ffff7David LawrenceXDEFINES += \
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence $(EOLIST)
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence
0014d6342b0d50ae37126ac16d5bf821d02ffff7David LawrenceXLFLAGS += \
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence $(EOLIST)
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrenceendif
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrewsifeq "$(RELEASE)" "release"
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark AndrewsXINCDIRS += \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(EOLIST)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
0014d6342b0d50ae37126ac16d5bf821d02ffff7David LawrenceXCFLAGS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXDEFINES += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXLFLAGS += \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(EOLIST)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendif
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# These are used by the link target if an NLM is being generated
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# This is used by the link 'name' directive to name the nlm. If left blank
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# TARGET_nlm (see below) will be used.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyifdef HAVE_OPENSSL
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyNLM_NAME = abs
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyelse
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyNLM_NAME = ab
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyendif
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# This is used by the link '-desc ' directive.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# If left blank, NLM_NAME will be used.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyNLM_DESCRIPTION = Apache $(VERSION_STR) Benchmark Utility for NetWare
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# This is used by the '-threadname' directive. If left blank,
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# NLM_NAME Thread will be used.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyNLM_THREAD_NAME = $(NLM_NAME)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# This is used by the '-screenname' directive. If left blank,
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# 'Apache for NetWare' Thread will be used.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#NLM_SCREEN_NAME = Apache Bench
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyNLM_SCREEN_NAME = DEFAULT
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# If this is specified, it will override VERSION value in
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# $(AP_WORK)/build/NWGNUenvironment.inc
#
NLM_VERSION =
#
# If this is specified, it will override the default of 64K
#
NLM_STACK_SIZE = 65536
#
# 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 = \
$(EOLIST)
#
# These are the OBJ files needed to create the NLM target above.
# Paths must all use the '/' character
#
FILES_nlm_objs = \
$(OBJDIR)/ab.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)
ifdef HAVE_OPENSSL
ifneq "$(USE_NTLS)" "1"
FILES_nlm_libs += \
$(SSL_LIB)/crypto.lib \
$(SSL_LIB)/ssl.lib \
$(EOLIST)
endif
endif
#
# 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)
ifdef HAVE_OPENSSL
ifeq "$(USE_NTLS)" "1"
FILES_nlm_modules += ntls \
$(EOLIST)
endif
endif
#
# 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 \
@libc.imp \
$(EOLIST)
# Don't link with Winsock if standard sockets are being used
ifneq "$(USE_STDSOCKETS)" "1"
FILES_nlm_Ximports += @ws2nlm.imp \
$(EOLIST)
endif
ifdef HAVE_OPENSSL
ifeq "$(USE_NTLS)" "1"
FILES_nlm_Ximports += @ntls.imp \
$(EOLIST)
else
FILES_nlm_Ximports += \
GetProcessSwitchCount \
RunningProcess \
GetSuperHighResolutionTimer \
$(EOLIST)
endif
endif
#
# 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
#
# Any specialized rules here
#
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
include $(AP_WORK)/build/NWGNUtail.inc