2 # This Makefile requires the environment var OSSLSDK
3 # pointing to the base directory of your OpenSSL SDK.
4 # If you want to use the Novell NTLS SDK instead then
5 # define NTLSSDK pointing to the base directory of the
6 # SDK, and also set USE_NTLS=1
10 # Declare the sub-directories to be built here
17 # Get the 'head' of the build environment. This includes default targets and
21 include $(AP_WORK)/build/NWGNUhead.inc
24 # build this level's files
26 # Make sure all needed macro's are defined
29 ifeq "$(USE_NTLS)" "1"
30 SSL_INC = $(NTLSSDK)/inc
31 SSL_LIB = $(NTLSSDK)/imp
32 SSL_BIN = $(NTLSSDK)/bin
33 SSL_APP = $(NTLSSDK)/apps
34 ifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
35 $(error '$(NTLSSDK)' does NOT point to a valid NTLS SDK!)
38 SSL_INC = $(OSSLSDK)/outinc_nw_libc
39 SSL_LIB = $(OSSLSDK)/out_nw_libc
40 SSL_BIN = $(OSSLSDK)/out_nw_libc
41 SSL_APP = $(OSSLSDK)/apps
42 ifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
43 $(error '$(OSSLSDK)' does NOT point to a valid OpenSSL SDK!)
48 # These directories will be at the beginning of the include list, followed by
57 $(AP_WORK)/modules/cache \
58 $(AP_WORK)/modules/generators \
59 $(AP_WORK)/server/mpm/NetWare \
64 # These flags will come after CFLAGS
70 # These defines will come after DEFINES
77 # These flags will be added to the link.opt file
84 # These values will be appended to the correct variables based on the value of
87 ifeq "$(RELEASE)" "debug"
101 ifeq "$(RELEASE)" "noopt"
115 ifeq "$(RELEASE)" "release"
130 # These are used by the link target if an NLM is being generated
131 # This is used by the link 'name' directive to name the nlm. If left blank
132 # TARGET_nlm (see below) will be used.
137 # This is used by the link '-desc ' directive.
138 # If left blank, NLM_NAME will be used.
140 ifeq "$(USE_NTLS)" "1"
141 NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (NTLS)
143 NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (OpenSSL)
147 # This is used by the '-threadname' directive. If left blank,
148 # NLM_NAME Thread will be used.
150 NLM_THREAD_NAME = $(NLM_NAME)
153 # If this is specified, it will override VERSION value in
154 # $(AP_WORK)/build/NWGNUenvironment.inc
159 # If this is specified, it will override the default of 64K
161 NLM_STACK_SIZE = 8192
165 # If this is specified it will be used by the link '-entry' directive
170 # If this is specified it will be used by the link '-exit' directive
175 # If this is specified it will be used by the link '-check' directive
180 # If this is specified it will be used by the link '-flags' directive
185 # If this is specified it will be linked in with the XDCData option in the def
186 # file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
187 # by setting APACHE_UNIPROC in the environment
192 # Declare all target files (you must add your files here)
196 # If there is an NLM target, put it here
199 $(OBJDIR)/$(NLM_NAME).nlm \
203 # If there is an LIB target, put it here
209 # These are the OBJ files needed to create the NLM target above.
210 # Paths must all use the '/' character
212 FILES_nlm_objs := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard *.c))
216 # These are the LIB files needed to create the NLM target above.
217 # These will be added as a library command in the link.opt file.
223 ifneq "$(USE_NTLS)" "1"
225 $(SSL_LIB)/crypto.lib \
231 # These are the modules that the above NLM target depends on to load.
232 # These will be added as a module command in the link.opt file.
234 FILES_nlm_modules = \
239 ifeq "$(USE_NTLS)" "1"
240 FILES_nlm_modules += ntls \
245 # If the nlm has a msg file, put it's path here
250 # If the nlm has a hlp file put it's path here
255 # If this is specified, it will override $(NWOS)\copyright.txt.
260 # Any additional imports go here
262 FILES_nlm_Ximports = \
268 # Don't link with Winsock if standard sockets are being used
269 ifneq "$(USE_STDSOCKETS)" "1"
270 FILES_nlm_Ximports += @ws2nlm.imp \
274 ifeq "$(USE_NTLS)" "1"
275 FILES_nlm_Ximports += @ntls.imp \
278 FILES_nlm_Ximports += \
279 GetProcessSwitchCount \
281 GetSuperHighResolutionTimer \
286 # Any symbols exported to here
288 FILES_nlm_exports = \
293 # These are the OBJ files needed to create the LIB target above.
294 # Paths must all use the '/' character
300 # implement targets and dependancies (leave this section alone)
303 libs :: $(OBJDIR) $(TARGET_lib)
305 nlms :: libs $(TARGET_nlm)
308 # Updated this target to create necessary directories and copy files to the
309 # correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
311 install :: nlms FORCE
312 copy $(OBJDIR)\mod_ssl.nlm $(INSTALL)\$(BASEDIR)\modules\*.*
313 -copy $(subst /,\,$(SSL_BIN))\openssl.nlm $(INSTALL)\$(BASEDIR)\bin\*.*
314 -copy $(subst /,\,$(SSL_APP))\openssl.cnf $(INSTALL)\$(BASEDIR)\bin\*.*
317 # Any specialized rules here
319 vpath %.c $(AP_WORK)/modules/arch/netware
322 # Include the 'tail' makefile that has targets that depend on variables defined
326 include $(APBUILD)/NWGNUtail.inc