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 $(STDMOD)/generators \
58 $(SERVER)/mpm/NetWare \
63 # These flags will come after CFLAGS
69 # These defines will come after DEFINES
76 # These flags will be added to the link.opt file
83 # These values will be appended to the correct variables based on the value of
86 ifeq "$(RELEASE)" "debug"
100 ifeq "$(RELEASE)" "noopt"
114 ifeq "$(RELEASE)" "release"
129 # These are used by the link target if an NLM is being generated
130 # This is used by the link 'name' directive to name the nlm. If left blank
131 # TARGET_nlm (see below) will be used.
136 # This is used by the link '-desc ' directive.
137 # If left blank, NLM_NAME will be used.
139 ifeq "$(USE_NTLS)" "1"
140 NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (NTLS)
142 NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (OpenSSL)
146 # This is used by the '-threadname' directive. If left blank,
147 # NLM_NAME Thread will be used.
149 NLM_THREAD_NAME = $(NLM_NAME)
152 # If this is specified, it will override VERSION value in
153 # $(AP_WORK)/build/NWGNUenvironment.inc
158 # If this is specified, it will override the default of 64K
160 NLM_STACK_SIZE = 8192
164 # If this is specified it will be used by the link '-entry' directive
169 # If this is specified it will be used by the link '-exit' directive
174 # If this is specified it will be used by the link '-check' directive
179 # If this is specified it will be used by the link '-flags' directive
184 # If this is specified it will be linked in with the XDCData option in the def
185 # file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
186 # by setting APACHE_UNIPROC in the environment
191 # Declare all target files (you must add your files here)
195 # If there is an NLM target, put it here
198 $(OBJDIR)/$(NLM_NAME).nlm \
202 # If there is an LIB target, put it here
208 # These are the OBJ files needed to create the NLM target above.
209 # Paths must all use the '/' character
211 FILES_nlm_objs := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard *.c))
215 # These are the LIB files needed to create the NLM target above.
216 # These will be added as a library command in the link.opt file.
222 ifneq "$(USE_NTLS)" "1"
224 $(SSL_LIB)/crypto.lib \
230 # These are the modules that the above NLM target depends on to load.
231 # These will be added as a module command in the link.opt file.
233 FILES_nlm_modules = \
238 ifeq "$(USE_NTLS)" "1"
239 FILES_nlm_modules += ntls \
244 # If the nlm has a msg file, put it's path here
249 # If the nlm has a hlp file put it's path here
254 # If this is specified, it will override $(NWOS)\copyright.txt.
259 # Any additional imports go here
261 FILES_nlm_Ximports = \
267 # Don't link with Winsock if standard sockets are being used
268 ifneq "$(USE_STDSOCKETS)" "1"
269 FILES_nlm_Ximports += @ws2nlm.imp \
273 ifeq "$(USE_NTLS)" "1"
274 FILES_nlm_Ximports += @ntls.imp \
277 FILES_nlm_Ximports += \
278 GetProcessSwitchCount \
280 GetSuperHighResolutionTimer \
285 # Any symbols exported to here
287 FILES_nlm_exports = \
292 # These are the OBJ files needed to create the LIB target above.
293 # Paths must all use the '/' character
299 # implement targets and dependancies (leave this section alone)
302 libs :: $(OBJDIR) $(TARGET_lib)
304 nlms :: libs $(TARGET_nlm)
307 # Updated this target to create necessary directories and copy files to the
308 # correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
310 install :: nlms FORCE
311 $(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/)
312 $(call COPY,$(SSL_BIN)/openssl.nlm, $(INSTALLBASE)/bin/)
313 $(call COPY,$(SSL_APP)/openssl.cnf, $(INSTALLBASE)/bin/)
316 # Any specialized rules here
318 vpath %.c $(STDMOD)/arch/netware
321 # Include the 'tail' makefile that has targets that depend on variables defined
325 include $(APBUILD)/NWGNUtail.inc