]> granicus.if.org Git - apache/blob - support/NWGNUab
More splitting as suggested by minfrin.
[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                         $(EOLIST)
59
60 #
61 # These flags will come after CFLAGS
62 #
63 XCFLAGS         += \
64                         $(EOLIST)
65
66 #
67 # These defines will come after DEFINES
68 #
69 ifdef HAVE_OPENSSL
70 XDEFINES        += \
71                         -DHAVE_OPENSSL \
72                         $(EOLIST)
73
74 #
75 # These flags will be added to the link.opt file
76 #
77 XLFLAGS         += \
78                         -l $(SSL_LIB) \
79                         $(EOLIST)
80 endif
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 ifdef HAVE_OPENSSL
134 NLM_NAME                = abs
135 else
136 NLM_NAME                = ab
137 endif
138
139 #
140 # This is used by the link '-desc ' directive.
141 # If left blank, NLM_NAME will be used.
142 #
143 NLM_DESCRIPTION = Apache $(VERSION_STR) Benchmark Utility for NetWare
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 # This is used by the '-screenname' directive.  If left blank,
153 # 'Apache for NetWare' Thread will be used.
154 #
155 #NLM_SCREEN_NAME = Apache Bench
156 NLM_SCREEN_NAME = DEFAULT
157
158 #
159 # If this is specified, it will override VERSION value in
160 # $(AP_WORK)\build\NWGNUenvironment.inc
161 #
162 NLM_VERSION     =
163
164 #
165 # If this is specified, it will override the default of 64K
166 #
167 NLM_STACK_SIZE  = 65536
168
169
170 #
171 # If this is specified it will be used by the link '-entry' directive
172 #
173 NLM_ENTRY_SYM   = _LibCPrelude
174
175 #
176 # If this is specified it will be used by the link '-exit' directive
177 #
178 NLM_EXIT_SYM    = _LibCPostlude
179
180 #
181 # If this is specified it will be used by the link '-check' directive
182 #
183 NLM_CHECK_SYM   =
184
185 #
186 # If these are specified it will be used by the link '-flags' directive
187 #
188 NLM_FLAGS       = AUTOUNLOAD, PSEUDOPREEMPTION
189
190 #
191 # If this is specified it will be linked in with the XDCData option in the def
192 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
193 # by setting APACHE_UNIPROC in the environment
194 #
195 XDCDATA         =
196
197 #
198 # If there is an NLM target, put it here
199 #
200 TARGET_nlm = \
201         $(OBJDIR)/$(NLM_NAME).nlm \
202         $(EOLIST)
203
204 #
205 # If there is an LIB target, put it here
206 #
207 TARGET_lib = \
208         $(EOLIST)
209
210 #
211 # These are the OBJ files needed to create the NLM target above.
212 # Paths must all use the '/' character
213 #
214 FILES_nlm_objs = \
215         $(OBJDIR)/ab.o \
216         $(EOLIST)
217
218 #
219 # These are the LIB files needed to create the NLM target above.
220 # These will be added as a library command in the link.opt file.
221 #
222 FILES_nlm_libs = \
223         libcpre.o \
224         $(EOLIST)
225
226 ifdef HAVE_OPENSSL
227 ifneq "$(USE_NTLS)" "1"
228 FILES_nlm_libs += \
229         $(SSL_LIB)/crypto.lib \
230         $(SSL_LIB)/ssl.lib \
231         $(EOLIST)
232 endif
233 endif
234
235 #
236 # These are the modules that the above NLM target depends on to load.
237 # These will be added as a module command in the link.opt file.
238 #
239 FILES_nlm_modules = \
240         aprlib \
241         libc \
242         $(EOLIST)
243
244 ifdef HAVE_OPENSSL
245 ifeq "$(USE_NTLS)" "1"
246 FILES_nlm_modules += ntls \
247         $(EOLIST)
248 endif
249 endif
250
251 #
252 # If the nlm has a msg file, put it's path here
253 #
254 FILE_nlm_msg =
255
256 #
257 # If the nlm has a hlp file put it's path here
258 #
259 FILE_nlm_hlp =
260
261 #
262 # If this is specified, it will override $(NWOS)\copyright.txt.
263 #
264 FILE_nlm_copyright =
265
266 #
267 # Any additional imports go here
268 #
269 FILES_nlm_Ximports = \
270         @$(APR)/aprlib.imp \
271         @libc.imp \
272         $(EOLIST)
273
274 # Don't link with Winsock if standard sockets are being used
275 ifneq "$(USE_STDSOCKETS)" "1"
276 FILES_nlm_Ximports += @ws2nlm.imp \
277         $(EOLIST)
278 endif
279
280 ifdef HAVE_OPENSSL
281 ifeq "$(USE_NTLS)" "1"
282 FILES_nlm_Ximports += @ntls.imp \
283         $(EOLIST)
284 else
285 FILES_nlm_Ximports += \
286         GetProcessSwitchCount \
287         RunningProcess \
288         GetSuperHighResolutionTimer \
289         $(EOLIST)
290 endif
291 endif
292
293 #
294 # Any symbols exported to here
295 #
296 FILES_nlm_exports = \
297         $(EOLIST)
298
299 #
300 # These are the OBJ files needed to create the LIB target above.
301 # Paths must all use the '/' character
302 #
303 FILES_lib_objs = \
304         $(EOLIST)
305
306 #
307 # implement targets and dependancies (leave this section alone)
308 #
309
310 libs :: $(OBJDIR) $(TARGET_lib)
311
312 nlms :: libs $(TARGET_nlm)
313
314 #
315 # Updated this target to create necessary directories and copy files to the
316 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
317 #
318 install :: nlms FORCE
319
320 #
321 # Any specialized rules here
322 #
323
324 #
325 # Include the 'tail' makefile that has targets that depend on variables defined
326 # in this makefile
327 #
328
329 include $(AP_WORK)/build/NWGNUtail.inc
330