|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# This Makefile requires the environment var OSSLSDK
|
|
Packit |
90a5c9 |
# pointing to the base directory of your OpenSSL SDK.
|
|
Packit |
90a5c9 |
# If you want to use the Novell NTLS SDK instead then
|
|
Packit |
90a5c9 |
# define NTLSSDK pointing to the base directory of the
|
|
Packit |
90a5c9 |
# SDK, and also set USE_NTLS=1
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Declare the sub-directories to be built here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
SUBDIRS = \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Get the 'head' of the build environment. This includes default targets and
|
|
Packit |
90a5c9 |
# paths to tools
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
include $(AP_WORK)/build/NWGNUhead.inc
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# build this level's files
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Make sure all needed macro's are defined
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
ifeq "$(USE_NTLS)" "1"
|
|
Packit |
90a5c9 |
SSL_INC = $(NTLSSDK)/inc
|
|
Packit |
90a5c9 |
SSL_LIB = $(NTLSSDK)/imp
|
|
Packit |
90a5c9 |
SSL_BIN = $(NTLSSDK)/bin
|
|
Packit |
90a5c9 |
SSL_APP = $(NTLSSDK)/apps
|
|
Packit |
90a5c9 |
ifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
|
|
Packit |
90a5c9 |
$(error '$(NTLSSDK)' does NOT point to a valid NTLS SDK!)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
SSL_INC = $(OSSLSDK)/outinc_nw_libc
|
|
Packit |
90a5c9 |
SSL_LIB = $(OSSLSDK)/out_nw_libc
|
|
Packit |
90a5c9 |
SSL_BIN = $(OSSLSDK)/out_nw_libc
|
|
Packit |
90a5c9 |
SSL_APP = $(OSSLSDK)/apps
|
|
Packit |
90a5c9 |
ifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
|
|
Packit |
90a5c9 |
$(error '$(OSSLSDK)' does NOT point to a valid OpenSSL SDK!)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These directories will be at the beginning of the include list, followed by
|
|
Packit |
90a5c9 |
# INCDIRS
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
XINCDIRS += \
|
|
Packit |
90a5c9 |
$(SSL_INC) \
|
|
Packit |
90a5c9 |
$(APR)/include \
|
|
Packit |
90a5c9 |
$(APRUTIL)/include \
|
|
Packit |
90a5c9 |
$(AP_WORK)/include \
|
|
Packit |
90a5c9 |
$(AP_WORK)/modules/cache \
|
|
Packit |
90a5c9 |
$(AP_WORK)/modules/generators \
|
|
Packit |
90a5c9 |
$(AP_WORK)/server/mpm/NetWare \
|
|
Packit |
90a5c9 |
$(NWOS) \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These flags will come after CFLAGS
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
XCFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These defines will come after DEFINES
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
XDEFINES += \
|
|
Packit |
90a5c9 |
-DHAVE_OPENSSL \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These flags will be added to the link.opt file
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
XLFLAGS += \
|
|
Packit |
90a5c9 |
-l $(SSL_LIB) \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These values will be appended to the correct variables based on the value of
|
|
Packit |
90a5c9 |
# RELEASE
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
ifeq "$(RELEASE)" "debug"
|
|
Packit |
90a5c9 |
XINCDIRS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XCFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XDEFINES += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XLFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
ifeq "$(RELEASE)" "noopt"
|
|
Packit |
90a5c9 |
XINCDIRS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XCFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XDEFINES += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XLFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
ifeq "$(RELEASE)" "release"
|
|
Packit |
90a5c9 |
XINCDIRS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XCFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XDEFINES += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
XLFLAGS += \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These are used by the link target if an NLM is being generated
|
|
Packit |
90a5c9 |
# This is used by the link 'name' directive to name the nlm. If left blank
|
|
Packit |
90a5c9 |
# TARGET_nlm (see below) will be used.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_NAME = mod_ssl
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# This is used by the link '-desc ' directive.
|
|
Packit |
90a5c9 |
# If left blank, NLM_NAME will be used.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
ifeq "$(USE_NTLS)" "1"
|
|
Packit |
90a5c9 |
NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (NTLS)
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (OpenSSL)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# This is used by the '-threadname' directive. If left blank,
|
|
Packit |
90a5c9 |
# NLM_NAME Thread will be used.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_THREAD_NAME = $(NLM_NAME)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified, it will override VERSION value in
|
|
Packit |
90a5c9 |
# $(AP_WORK)/build/NWGNUenvironment.inc
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_VERSION =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified, it will override the default of 64K
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_STACK_SIZE = 8192
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified it will be used by the link '-entry' directive
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_ENTRY_SYM =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified it will be used by the link '-exit' directive
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_EXIT_SYM =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified it will be used by the link '-check' directive
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_CHECK_SYM =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified it will be used by the link '-flags' directive
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
NLM_FLAGS =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified it will be linked in with the XDCData option in the def
|
|
Packit |
90a5c9 |
# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
|
|
Packit |
90a5c9 |
# by setting APACHE_UNIPROC in the environment
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
XDCDATA =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Declare all target files (you must add your files here)
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If there is an NLM target, put it here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
TARGET_nlm = \
|
|
Packit |
90a5c9 |
$(OBJDIR)/$(NLM_NAME).nlm \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If there is an LIB target, put it here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
TARGET_lib = \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These are the OBJ files needed to create the NLM target above.
|
|
Packit |
90a5c9 |
# Paths must all use the '/' character
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILES_nlm_objs := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard *.c))
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These are the LIB files needed to create the NLM target above.
|
|
Packit |
90a5c9 |
# These will be added as a library command in the link.opt file.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILES_nlm_libs = \
|
|
Packit |
90a5c9 |
$(PRELUDE) \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
ifneq "$(USE_NTLS)" "1"
|
|
Packit |
90a5c9 |
FILES_nlm_libs += \
|
|
Packit |
90a5c9 |
$(SSL_LIB)/crypto.lib \
|
|
Packit |
90a5c9 |
$(SSL_LIB)/ssl.lib \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These are the modules that the above NLM target depends on to load.
|
|
Packit |
90a5c9 |
# These will be added as a module command in the link.opt file.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILES_nlm_modules = \
|
|
Packit |
90a5c9 |
Apache2 \
|
|
Packit |
90a5c9 |
Libc \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
ifeq "$(USE_NTLS)" "1"
|
|
Packit |
90a5c9 |
FILES_nlm_modules += ntls \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If the nlm has a msg file, put it's path here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILE_nlm_msg =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If the nlm has a hlp file put it's path here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILE_nlm_hlp =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# If this is specified, it will override $(NWOS)\copyright.txt.
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILE_nlm_copyright =
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Any additional imports go here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILES_nlm_Ximports = \
|
|
Packit |
90a5c9 |
@libc.imp \
|
|
Packit |
90a5c9 |
@aprlib.imp \
|
|
Packit |
90a5c9 |
@httpd.imp \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
# Don't link with Winsock if standard sockets are being used
|
|
Packit |
90a5c9 |
ifneq "$(USE_STDSOCKETS)" "1"
|
|
Packit |
90a5c9 |
FILES_nlm_Ximports += @ws2nlm.imp \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
ifeq "$(USE_NTLS)" "1"
|
|
Packit |
90a5c9 |
FILES_nlm_Ximports += @ntls.imp \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
else
|
|
Packit |
90a5c9 |
FILES_nlm_Ximports += \
|
|
Packit |
90a5c9 |
GetProcessSwitchCount \
|
|
Packit |
90a5c9 |
RunningProcess \
|
|
Packit |
90a5c9 |
GetSuperHighResolutionTimer \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
endif
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Any symbols exported to here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILES_nlm_exports = \
|
|
Packit |
90a5c9 |
ssl_module \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# These are the OBJ files needed to create the LIB target above.
|
|
Packit |
90a5c9 |
# Paths must all use the '/' character
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
FILES_lib_objs = \
|
|
Packit |
90a5c9 |
$(EOLIST)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# implement targets and dependancies (leave this section alone)
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
libs :: $(OBJDIR) $(TARGET_lib)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
nlms :: libs $(TARGET_nlm)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Updated this target to create necessary directories and copy files to the
|
|
Packit |
90a5c9 |
# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
install :: nlms FORCE
|
|
Packit |
90a5c9 |
$(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/)
|
|
Packit |
90a5c9 |
$(call COPY,$(SSL_BIN)/openssl.nlm, $(INSTALLBASE)/bin/)
|
|
Packit |
90a5c9 |
$(call COPY,$(SSL_APP)/openssl.cnf, $(INSTALLBASE)/bin/)
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Any specialized rules here
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
vpath %.c $(AP_WORK)/modules/arch/netware
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
# Include the 'tail' makefile that has targets that depend on variables defined
|
|
Packit |
90a5c9 |
# in this makefile
|
|
Packit |
90a5c9 |
#
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
include $(APBUILD)/NWGNUtail.inc
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|