]> granicus.if.org Git - apache/blob - modules/ssl/NWGNUmakefile
NetWare build overhaul in order to compile on Linux.
[apache] / modules / ssl / NWGNUmakefile
1 #
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
7 #
8
9 #
10 # Declare the sub-directories to be built here
11 #
12
13 SUBDIRS = \
14         $(EOLIST)
15
16 #
17 # Get the 'head' of the build environment.  This includes default targets and
18 # paths to tools
19 #
20
21 include $(AP_WORK)/build/NWGNUhead.inc
22
23 #
24 # build this level's files
25 #
26 # Make sure all needed macro's are defined
27 #
28
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!)
36 endif
37 else
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!)
44 endif
45 endif
46
47 #
48 # These directories will be at the beginning of the include list, followed by
49 # INCDIRS
50 #
51 XINCDIRS        += \
52                         $(SSL_INC) \
53                         $(SSL_INC)/openssl \
54                         $(APR)/include \
55                         $(APRUTIL)/include \
56                         $(AP_WORK)/include \
57                         $(AP_WORK)/modules/cache \
58                         $(AP_WORK)/modules/generators \
59                         $(AP_WORK)/server/mpm/NetWare \
60                         $(NWOS) \
61                         $(EOLIST)
62
63 #
64 # These flags will come after CFLAGS
65 #
66 XCFLAGS         += \
67                         $(EOLIST)
68
69 #
70 # These defines will come after DEFINES
71 #
72 XDEFINES        += \
73                         -DHAVE_OPENSSL \
74                         $(EOLIST)
75
76 #
77 # These flags will be added to the link.opt file
78 #
79 XLFLAGS         += \
80                         -l $(SSL_LIB) \
81                         $(EOLIST)
82
83 #
84 # These values will be appended to the correct variables based on the value of
85 # RELEASE
86 #
87 ifeq "$(RELEASE)" "debug"
88 XINCDIRS        += \
89                         $(EOLIST)
90
91 XCFLAGS         += \
92                         $(EOLIST)
93
94 XDEFINES        += \
95                         $(EOLIST)
96
97 XLFLAGS         += \
98                         $(EOLIST)
99 endif
100
101 ifeq "$(RELEASE)" "noopt"
102 XINCDIRS        += \
103                         $(EOLIST)
104
105 XCFLAGS         += \
106                         $(EOLIST)
107
108 XDEFINES        += \
109                         $(EOLIST)
110
111 XLFLAGS         += \
112                         $(EOLIST)
113 endif
114
115 ifeq "$(RELEASE)" "release"
116 XINCDIRS        += \
117                         $(EOLIST)
118
119 XCFLAGS         += \
120                         $(EOLIST)
121
122 XDEFINES        += \
123                         $(EOLIST)
124
125 XLFLAGS         += \
126                         $(EOLIST)
127 endif
128
129 #
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.
133 #
134 NLM_NAME        = mod_ssl
135
136 #
137 # This is used by the link '-desc ' directive.
138 # If left blank, NLM_NAME will be used.
139 #
140 ifeq "$(USE_NTLS)" "1"
141 NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (NTLS)
142 else
143 NLM_DESCRIPTION = Apache $(VERSION_STR) SSL module (OpenSSL)
144 endif
145
146 #
147 # This is used by the '-threadname' directive.  If left blank,
148 # NLM_NAME Thread will be used.
149 #
150 NLM_THREAD_NAME = $(NLM_NAME)
151
152 #
153 # If this is specified, it will override VERSION value in
154 # $(AP_WORK)/build/NWGNUenvironment.inc
155 #
156 NLM_VERSION     =
157
158 #
159 # If this is specified, it will override the default of 64K
160 #
161 NLM_STACK_SIZE  = 8192
162
163
164 #
165 # If this is specified it will be used by the link '-entry' directive
166 #
167 NLM_ENTRY_SYM   =
168
169 #
170 # If this is specified it will be used by the link '-exit' directive
171 #
172 NLM_EXIT_SYM    =
173
174 #
175 # If this is specified it will be used by the link '-check' directive
176 #
177 NLM_CHECK_SYM   =
178
179 #
180 # If this is specified it will be used by the link '-flags' directive
181 #
182 NLM_FLAGS       =
183
184 #
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
188 #
189 XDCDATA         =
190
191 #
192 # Declare all target files (you must add your files here)
193 #
194
195 #
196 # If there is an NLM target, put it here
197 #
198 TARGET_nlm = \
199         $(OBJDIR)/$(NLM_NAME).nlm \
200         $(EOLIST)
201
202 #
203 # If there is an LIB target, put it here
204 #
205 TARGET_lib = \
206         $(EOLIST)
207
208 #
209 # These are the OBJ files needed to create the NLM target above.
210 # Paths must all use the '/' character
211 #
212 FILES_nlm_objs := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard *.c))
213
214
215 #
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.
218 #
219 FILES_nlm_libs = \
220         libcpre.o \
221         $(EOLIST)
222
223 ifneq "$(USE_NTLS)" "1"
224 FILES_nlm_libs += \
225         $(SSL_LIB)/crypto.lib \
226         $(SSL_LIB)/ssl.lib \
227         $(EOLIST)
228 endif
229
230 #
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.
233 #
234 FILES_nlm_modules = \
235         Apache2 \
236         Libc \
237         $(EOLIST)
238
239 ifeq "$(USE_NTLS)" "1"
240 FILES_nlm_modules += ntls \
241         $(EOLIST)
242 endif
243
244 #
245 # If the nlm has a msg file, put it's path here
246 #
247 FILE_nlm_msg =
248
249 #
250 # If the nlm has a hlp file put it's path here
251 #
252 FILE_nlm_hlp =
253
254 #
255 # If this is specified, it will override $(NWOS)\copyright.txt.
256 #
257 FILE_nlm_copyright =
258
259 #
260 # Any additional imports go here
261 #
262 FILES_nlm_Ximports = \
263         @libc.imp \
264         @aprlib.imp \
265         @httpd.imp \
266         $(EOLIST)
267
268 # Don't link with Winsock if standard sockets are being used
269 ifneq "$(USE_STDSOCKETS)" "1"
270 FILES_nlm_Ximports += @ws2nlm.imp \
271         $(EOLIST)
272 endif
273
274 ifeq "$(USE_NTLS)" "1"
275 FILES_nlm_Ximports += @ntls.imp \
276         $(EOLIST)
277 else
278 FILES_nlm_Ximports += \
279         GetProcessSwitchCount \
280         RunningProcess \
281         GetSuperHighResolutionTimer \
282         $(EOLIST)
283 endif
284
285 #
286 # Any symbols exported to here
287 #
288 FILES_nlm_exports = \
289         ssl_module \
290         $(EOLIST)
291
292 #
293 # These are the OBJ files needed to create the LIB target above.
294 # Paths must all use the '/' character
295 #
296 FILES_lib_objs = \
297         $(EOLIST)
298
299 #
300 # implement targets and dependancies (leave this section alone)
301 #
302
303 libs :: $(OBJDIR) $(TARGET_lib)
304
305 nlms :: libs $(TARGET_nlm)
306
307 #
308 # Updated this target to create necessary directories and copy files to the
309 # correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
310 #
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\*.*
315
316 #
317 # Any specialized rules here
318 #
319 vpath %.c $(AP_WORK)/modules/arch/netware
320
321 #
322 # Include the 'tail' makefile that has targets that depend on variables defined
323 # in this makefile
324 #
325
326 include $(APBUILD)/NWGNUtail.inc
327
328