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