NWGNUmakefile revision 44f575c8cb19a7a5cd61664a7848be6bc197df02
8200fe25ffab8b2032d046c88710a949f361b700rmesta# This Makefile requires the environment var OSSLSDK
8200fe25ffab8b2032d046c88710a949f361b700rmesta# pointing to the base directory of your OpenSSL SDK.
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If you want to use the Novell NTLS SDK instead then
8200fe25ffab8b2032d046c88710a949f361b700rmesta# define NTLSSDK pointing to the base directory of the
8200fe25ffab8b2032d046c88710a949f361b700rmesta# SDK, and also set USE_NTLS=1
8200fe25ffab8b2032d046c88710a949f361b700rmesta# Declare the sub-directories to be built here
8200fe25ffab8b2032d046c88710a949f361b700rmesta# Get the 'head' of the build environment. This includes default targets and
8200fe25ffab8b2032d046c88710a949f361b700rmesta# paths to tools
8200fe25ffab8b2032d046c88710a949f361b700rmestainclude $(AP_WORK)/build/NWGNUhead.inc
8200fe25ffab8b2032d046c88710a949f361b700rmesta# build this level's files
8200fe25ffab8b2032d046c88710a949f361b700rmesta# Make sure all needed macro's are defined
8200fe25ffab8b2032d046c88710a949f361b700rmestaifeq "$(USE_NTLS)" "1"
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_INC = $(NTLSSDK)/inc
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_LIB = $(NTLSSDK)/imp
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_BIN = $(NTLSSDK)/bin
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_APP = $(NTLSSDK)/apps
8200fe25ffab8b2032d046c88710a949f361b700rmestaifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
8200fe25ffab8b2032d046c88710a949f361b700rmesta$(error '$(NTLSSDK)' does NOT point to a valid NTLS SDK!)
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_INC = $(OSSLSDK)/outinc_nw_libc
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_LIB = $(OSSLSDK)/out_nw_libc
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_BIN = $(OSSLSDK)/out_nw_libc
8200fe25ffab8b2032d046c88710a949f361b700rmestaSSL_APP = $(OSSLSDK)/apps
8200fe25ffab8b2032d046c88710a949f361b700rmestaifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
8200fe25ffab8b2032d046c88710a949f361b700rmesta$(error '$(OSSLSDK)' does NOT point to a valid OpenSSL SDK!)
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These directories will be at the beginning of the include list, followed by
8200fe25ffab8b2032d046c88710a949f361b700rmestaXINCDIRS += \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(SSL_INC) \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(APR)/include \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(APRUTIL)/include \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(SRC)/include \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(STDMOD)/cache \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(STDMOD)/generators \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These flags will come after CFLAGS
8200fe25ffab8b2032d046c88710a949f361b700rmestaXCFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These defines will come after DEFINES
8200fe25ffab8b2032d046c88710a949f361b700rmestaXDEFINES += \
8200fe25ffab8b2032d046c88710a949f361b700rmesta -DHAVE_OPENSSL \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These flags will be added to the link.opt file
8200fe25ffab8b2032d046c88710a949f361b700rmestaXLFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmesta -l $(SSL_LIB) \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These values will be appended to the correct variables based on the value of
8200fe25ffab8b2032d046c88710a949f361b700rmestaifeq "$(RELEASE)" "debug"
8200fe25ffab8b2032d046c88710a949f361b700rmestaXINCDIRS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXCFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXDEFINES += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXLFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaifeq "$(RELEASE)" "noopt"
8200fe25ffab8b2032d046c88710a949f361b700rmestaXINCDIRS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXCFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXDEFINES += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXLFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaifeq "$(RELEASE)" "release"
8200fe25ffab8b2032d046c88710a949f361b700rmestaXINCDIRS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXCFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXDEFINES += \
8200fe25ffab8b2032d046c88710a949f361b700rmestaXLFLAGS += \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These are used by the link target if an NLM is being generated
8200fe25ffab8b2032d046c88710a949f361b700rmesta# This is used by the link 'name' directive to name the nlm. If left blank
8200fe25ffab8b2032d046c88710a949f361b700rmesta# TARGET_nlm (see below) will be used.
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_NAME = mod_ssl
8200fe25ffab8b2032d046c88710a949f361b700rmesta# This is used by the link '-desc ' directive.
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If left blank, NLM_NAME will be used.
8200fe25ffab8b2032d046c88710a949f361b700rmestaifeq "$(USE_NTLS)" "1"
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (NTLS)
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (OpenSSL)
8200fe25ffab8b2032d046c88710a949f361b700rmesta# This is used by the '-threadname' directive. If left blank,
8200fe25ffab8b2032d046c88710a949f361b700rmesta# NLM_NAME Thread will be used.
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_THREAD_NAME = $(NLM_NAME)
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified, it will override VERSION value in
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_VERSION =
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified, it will override the default of 64K
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_STACK_SIZE = 8192
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified it will be used by the link '-entry' directive
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_ENTRY_SYM =
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified it will be used by the link '-exit' directive
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_EXIT_SYM =
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified it will be used by the link '-check' directive
8200fe25ffab8b2032d046c88710a949f361b700rmestaNLM_CHECK_SYM =
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified it will be used by the link '-flags' directive
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If this is specified it will be linked in with the XDCData option in the def
8200fe25ffab8b2032d046c88710a949f361b700rmesta# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
8200fe25ffab8b2032d046c88710a949f361b700rmesta# by setting APACHE_UNIPROC in the environment
8200fe25ffab8b2032d046c88710a949f361b700rmesta# Declare all target files (you must add your files here)
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If there is an NLM target, put it here
8200fe25ffab8b2032d046c88710a949f361b700rmestaTARGET_nlm = \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(OBJDIR)/$(NLM_NAME).nlm \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# If there is an LIB target, put it here
8200fe25ffab8b2032d046c88710a949f361b700rmestaTARGET_lib = \
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These are the OBJ files needed to create the NLM target above.
8200fe25ffab8b2032d046c88710a949f361b700rmesta# Paths must all use the '/' character
8200fe25ffab8b2032d046c88710a949f361b700rmestaFILES_nlm_objs := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard *.c))
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These are the LIB files needed to create the NLM target above.
8200fe25ffab8b2032d046c88710a949f361b700rmesta# These will be added as a library command in the link.opt file.
8200fe25ffab8b2032d046c88710a949f361b700rmestaFILES_nlm_libs = \
8200fe25ffab8b2032d046c88710a949f361b700rmesta $(PRELUDE) \
8200fe25ffab8b2032d046c88710a949f361b700rmestaifneq "$(USE_NTLS)" "1"
8200fe25ffab8b2032d046c88710a949f361b700rmestaFILES_nlm_libs += \
$(SSL_LIB)/crypto.lib \
$(SSL_LIB)/ssl.lib \
# These will be added as a module command in the link.opt file.
# If this is specified, it will override $(NWOS)\copyright.txt.
@libc.imp \
@aprlib.imp \
@httpd.imp \
FILES_nlm_Ximports += @ws2nlm.imp \
FILES_nlm_Ximports += @ntls.imp \
# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
$(call COPY,$(SSL_BIN)/openssl.nlm, $(INSTALLBASE)/bin/)
$(call COPY,$(SSL_APP)/openssl.cnf, $(INSTALLBASE)/bin/)
vpath %.c $(STDMOD)/arch/netware
include $(APBUILD)/NWGNUtail.inc