]> granicus.if.org Git - apache/blob - support/NWGNUab
Correct referenced OpenSSL version now that 0.9.8m
[apache] / support / NWGNUab
1 #
2 # Get the 'head' of the build environment if necessary.  This includes default
3 # targets and paths to tools
4 #
5
6 ifndef EnvironmentDefined
7 include $(AP_WORK)/build/NWGNUhead.inc
8 endif
9
10 #
11 # build this level's files
12 #
13 # Make sure all needed macro's are defined
14 #
15
16 ifeq "$(WITH_ABS)" "1"
17
18 ifeq "$(USE_NTLS)" "1"
19 SSL_INC = $(NTLSSDK)/inc
20 SSL_LIB = $(NTLSSDK)/imp
21 SSL_BIN = $(NTLSSDK)/bin
22 SSL_APP = $(NTLSSDK)/apps
23 ifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
24 $(warning '$(NTLSSDK)' does NOT point to a valid NTLS SDK!)
25 endif
26 else
27 SSL_INC = $(OSSLSDK)/outinc_nw_libc
28 SSL_LIB = $(OSSLSDK)/out_nw_libc
29 SSL_BIN = $(OSSLSDK)/out_nw_libc
30 SSL_APP = $(OSSLSDK)/apps
31 ifneq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
32 $(warning '$(OSSLSDK)' does NOT point to a valid OpenSSL SDK!)
33 endif
34 endif
35 ifeq "$(wildcard $(SSL_INC)/openssl/opensslv.h)" "$(SSL_INC)/openssl/opensslv.h"
36 HAVE_OPENSSL = 1
37 endif
38
39 endif
40
41 #
42 # These directories will be at the beginning of the include list, followed by
43 # INCDIRS
44 #
45 ifdef HAVE_OPENSSL
46 XINCDIRS        += \
47                         $(SSL_INC) \
48                         $(SSL_INC)/openssl \
49                         $(EOLIST)
50 endif
51
52 XINCDIRS        += \
53                         $(NWOS) \
54                         $(AP_WORK)/include \
55                         $(APR)/include \
56                         $(APRUTIL)/include \
57                         $(APR)/misc/netware \
58                         $(APR) \
59                         $(EOLIST)
60
61 #
62 # These flags will come after CFLAGS
63 #
64 XCFLAGS         += \
65                         $(EOLIST)
66
67 #
68 # These defines will come after DEFINES
69 #
70 ifdef HAVE_OPENSSL
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 endif
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 ifdef HAVE_OPENSSL
135 NLM_NAME                = abs
136 else
137 NLM_NAME                = ab
138 endif
139
140 #
141 # This is used by the link '-desc ' directive.
142 # If left blank, NLM_NAME will be used.
143 #
144 NLM_DESCRIPTION = Apache $(VERSION_STR) Benchmark Utility for NetWare
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 # This is used by the '-screenname' directive.  If left blank,
154 # 'Apache for NetWare' Thread will be used.
155 #
156 #NLM_SCREEN_NAME = Apache Bench
157 NLM_SCREEN_NAME = DEFAULT
158
159 #
160 # If this is specified, it will override VERSION value in
161 # $(AP_WORK)\build\NWGNUenvironment.inc
162 #
163 NLM_VERSION     =
164
165 #
166 # If this is specified, it will override the default of 64K
167 #
168 NLM_STACK_SIZE  = 65536
169
170
171 #
172 # If this is specified it will be used by the link '-entry' directive
173 #
174 NLM_ENTRY_SYM   = _LibCPrelude
175
176 #
177 # If this is specified it will be used by the link '-exit' directive
178 #
179 NLM_EXIT_SYM    = _LibCPostlude
180
181 #
182 # If this is specified it will be used by the link '-check' directive
183 #
184 NLM_CHECK_SYM   =
185
186 #
187 # If these are specified it will be used by the link '-flags' directive
188 #
189 NLM_FLAGS       = AUTOUNLOAD, PSEUDOPREEMPTION
190
191 #
192 # If this is specified it will be linked in with the XDCData option in the def
193 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
194 # by setting APACHE_UNIPROC in the environment
195 #
196 XDCDATA         =
197
198 #
199 # If there is an NLM target, put it here
200 #
201 TARGET_nlm = \
202         $(OBJDIR)/$(NLM_NAME).nlm \
203         $(EOLIST)
204
205 #
206 # If there is an LIB target, put it here
207 #
208 TARGET_lib = \
209         $(EOLIST)
210
211 #
212 # These are the OBJ files needed to create the NLM target above.
213 # Paths must all use the '/' character
214 #
215 FILES_nlm_objs = \
216         $(OBJDIR)/ab.o \
217         $(EOLIST)
218
219 #
220 # These are the LIB files needed to create the NLM target above.
221 # These will be added as a library command in the link.opt file.
222 #
223 FILES_nlm_libs = \
224         libcpre.o \
225         $(EOLIST)
226
227 ifdef HAVE_OPENSSL
228 ifneq "$(USE_NTLS)" "1"
229 FILES_nlm_libs += \
230         $(SSL_LIB)/crypto.lib \
231         $(SSL_LIB)/ssl.lib \
232         $(EOLIST)
233 endif
234 endif
235
236 #
237 # These are the modules that the above NLM target depends on to load.
238 # These will be added as a module command in the link.opt file.
239 #
240 FILES_nlm_modules = \
241         aprlib \
242         libc \
243         $(EOLIST)
244
245 ifdef HAVE_OPENSSL
246 ifeq "$(USE_NTLS)" "1"
247 FILES_nlm_modules += ntls \
248         $(EOLIST)
249 endif
250 endif
251
252 #
253 # If the nlm has a msg file, put it's path here
254 #
255 FILE_nlm_msg =
256
257 #
258 # If the nlm has a hlp file put it's path here
259 #
260 FILE_nlm_hlp =
261
262 #
263 # If this is specified, it will override $(NWOS)\copyright.txt.
264 #
265 FILE_nlm_copyright =
266
267 #
268 # Any additional imports go here
269 #
270 FILES_nlm_Ximports = \
271         @$(APR)/aprlib.imp \
272         @libc.imp \
273         $(EOLIST)
274
275 # Don't link with Winsock if standard sockets are being used
276 ifneq "$(USE_STDSOCKETS)" "1"
277 FILES_nlm_Ximports += @ws2nlm.imp \
278         $(EOLIST)
279 endif
280
281 ifdef HAVE_OPENSSL
282 ifeq "$(USE_NTLS)" "1"
283 FILES_nlm_Ximports += @ntls.imp \
284         $(EOLIST)
285 else
286 FILES_nlm_Ximports += \
287         GetProcessSwitchCount \
288         RunningProcess \
289         GetSuperHighResolutionTimer \
290         $(EOLIST)
291 endif
292 endif
293
294 #
295 # Any symbols exported to here
296 #
297 FILES_nlm_exports = \
298         $(EOLIST)
299
300 #
301 # These are the OBJ files needed to create the LIB target above.
302 # Paths must all use the '/' character
303 #
304 FILES_lib_objs = \
305         $(EOLIST)
306
307 #
308 # implement targets and dependancies (leave this section alone)
309 #
310
311 libs :: $(OBJDIR) $(TARGET_lib)
312
313 nlms :: libs $(TARGET_nlm)
314
315 #
316 # Updated this target to create necessary directories and copy files to the
317 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
318 #
319 install :: nlms FORCE
320
321 #
322 # Any specialized rules here
323 #
324
325 #
326 # Include the 'tail' makefile that has targets that depend on variables defined
327 # in this makefile
328 #
329
330 include $(AP_WORK)/build/NWGNUtail.inc
331