]> granicus.if.org Git - apache/blob - support/NWGNUab
*) ab: Fix a 100% CPU loop on platforms where a failed non-blocking connect
[apache] / support / NWGNUab
1 #
2 # Make sure all needed macro's are defined
3 #
4
5 #
6 # Get the 'head' of the build environment if necessary.  This includes default
7 # targets and paths to tools
8 #
9
10 ifndef EnvironmentDefined
11 include $(AP_WORK)\build\NWGNUhead.inc
12 endif
13
14 #
15 # build this level's files
16 #
17 # Make sure all needed macro's are defined
18 #
19
20 ifdef WITH_MOD_SSL
21 ifneq "$(OSSLSDK)" ""
22 OSSLINC = $(OSSLSDK)/outinc_nw_libc
23 OSSLLIB = $(OSSLSDK)/out_nw_libc
24 HAVE_OPENSSL = 1
25 endif
26 endif
27
28 #
29 # These directories will be at the beginning of the include list, followed by
30 # INCDIRS
31 #
32 ifdef HAVE_OPENSSL
33 XINCDIRS        += \
34                         $(OSSLINC) \
35                         $(OSSLINC)/openssl \
36                         $(EOLIST)
37 endif
38
39 XINCDIRS        += \
40                         $(NWOS) \
41                         $(AP_WORK)/include \
42                         $(APR)/include \
43                         $(APRUTIL)/include \
44                         $(APR)/misc/netware \
45                         $(APR) \
46                         $(EOLIST)
47
48 #
49 # These flags will come after CFLAGS
50 #
51 XCFLAGS         += \
52                         $(EOLIST)
53
54 #
55 # These defines will come after DEFINES
56 #
57 ifdef HAVE_OPENSSL
58 XDEFINES        += \
59                         -DHAVE_OPENSSL \
60                         $(EOLIST)
61
62 #
63 # These flags will be added to the link.opt file
64 #
65 XLFLAGS         += \
66                         -l $(OSSLLIB) \
67                         $(EOLIST)
68 endif
69
70 #
71 # These values will be appended to the correct variables based on the value of
72 # RELEASE
73 #
74 ifeq "$(RELEASE)" "debug"
75 XINCDIRS        += \
76                         $(EOLIST)
77
78 XCFLAGS         += \
79                         $(EOLIST)
80
81 XDEFINES        += \
82                         $(EOLIST)
83
84 XLFLAGS         += \
85                         $(EOLIST)
86 endif
87
88 ifeq "$(RELEASE)" "noopt"
89 XINCDIRS        += \
90                         $(EOLIST)
91
92 XCFLAGS         += \
93                         $(EOLIST)
94
95 XDEFINES        += \
96                         $(EOLIST)
97
98 XLFLAGS         += \
99                         $(EOLIST)
100 endif
101
102 ifeq "$(RELEASE)" "release"
103 XINCDIRS        += \
104                         $(EOLIST)
105
106 XCFLAGS         += \
107                         $(EOLIST)
108
109 XDEFINES        += \
110                         $(EOLIST)
111
112 XLFLAGS         += \
113                         $(EOLIST)
114 endif
115
116 #
117 # These are used by the link target if an NLM is being generated
118 # This is used by the link 'name' directive to name the nlm.  If left blank
119 # TARGET_nlm (see below) will be used.
120 #
121 ifdef HAVE_OPENSSL
122 NLM_NAME                = abs
123 else
124 NLM_NAME                = ab
125 endif
126
127 #
128 # This is used by the link '-desc ' directive.
129 # If left blank, NLM_NAME will be used.
130 #
131 NLM_DESCRIPTION = Apache $(VERSION_STR) Benchmark Utility for NetWare
132
133 #
134 # This is used by the '-threadname' directive.  If left blank,
135 # NLM_NAME Thread will be used.
136 #
137 NLM_THREAD_NAME = $(NLM_NAME)
138
139 #
140 # This is used by the '-screenname' directive.  If left blank,
141 # 'Apache for NetWare' Thread will be used.
142 #
143 #NLM_SCREEN_NAME = Apache Bench
144 NLM_SCREEN_NAME = DEFAULT
145
146 #
147 # If this is specified, it will override VERSION value in
148 # $(AP_WORK)\build\NWGNUenvironment.inc
149 #
150 NLM_VERSION     =
151
152 #
153 # If this is specified, it will override the default of 64K
154 #
155 NLM_STACK_SIZE  = 8192
156
157
158 #
159 # If this is specified it will be used by the link '-entry' directive
160 #
161 NLM_ENTRY_SYM   = _LibCPrelude
162
163 #
164 # If this is specified it will be used by the link '-exit' directive
165 #
166 NLM_EXIT_SYM    = _LibCPostlude
167
168 #
169 # If this is specified it will be used by the link '-check' directive
170 #
171 NLM_CHECK_SYM   =
172
173 #
174 # If these are specified it will be used by the link '-flags' directive
175 #
176 NLM_FLAGS       = AUTOUNLOAD, PSEUDOPREEMPTION
177
178 #
179 # If this is specified it will be linked in with the XDCData option in the def
180 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
181 # by setting APACHE_UNIPROC in the environment
182 #
183 XDCDATA         =
184
185 #
186 # If there is an NLM target, put it here
187 #
188 TARGET_nlm = \
189         $(OBJDIR)/$(NLM_NAME).nlm \
190         $(EOLIST)
191
192 #
193 # If there is an LIB target, put it here
194 #
195 TARGET_lib = \
196         $(EOLIST)
197
198 #
199 # These are the OBJ files needed to create the NLM target above.
200 # Paths must all use the '/' character
201 #
202 FILES_nlm_objs = \
203         $(OBJDIR)/ab.o \
204         $(EOLIST)
205
206 #
207 # These are the LIB files needed to create the NLM target above.
208 # These will be added as a library command in the link.opt file.
209 #
210 FILES_nlm_libs = \
211         libcpre.o \
212         $(EOLIST)
213
214 ifdef HAVE_OPENSSL
215 FILES_nlm_libs += \
216         $(OSSLLIB)/crypto.lib \
217         $(OSSLLIB)/ssl.lib \
218         $(EOLIST)
219 endif
220
221 #
222 # These are the modules that the above NLM target depends on to load.
223 # These will be added as a module command in the link.opt file.
224 #
225 FILES_nlm_modules = \
226         aprlib \
227         libc \
228         $(EOLIST)
229
230 #
231 # If the nlm has a msg file, put it's path here
232 #
233 FILE_nlm_msg =
234
235 #
236 # If the nlm has a hlp file put it's path here
237 #
238 FILE_nlm_hlp =
239
240 #
241 # If this is specified, it will override $(NWOS)\copyright.txt.
242 #
243 FILE_nlm_copyright =
244
245 #
246 # Any additional imports go here
247 #
248 FILES_nlm_Ximports = \
249         @$(APR)/aprlib.imp \
250         @libc.imp \
251         $(EOLIST)
252
253 ifdef HAVE_OPENSSL
254 # Don't link with Winsock if standard sockets are being used
255 ifndef USE_STDSOCKETS
256 FILES_nlm_Ximports += @ws2nlm.imp \
257         $(EOLIST)
258 endif
259 FILES_nlm_Ximports += \
260         GetProcessSwitchCount \
261         RunningProcess \
262         GetSuperHighResolutionTimer \
263         $(EOLIST)
264 endif
265
266 #
267 # Any symbols exported to here
268 #
269 FILES_nlm_exports = \
270         $(EOLIST)
271
272 #
273 # These are the OBJ files needed to create the LIB target above.
274 # Paths must all use the '/' character
275 #
276 FILES_lib_objs = \
277         $(EOLIST)
278
279 #
280 # implement targets and dependancies (leave this section alone)
281 #
282
283 libs :: $(OBJDIR) $(TARGET_lib)
284
285 nlms :: libs $(TARGET_nlm)
286
287 #
288 # Updated this target to create necessary directories and copy files to the
289 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
290 #
291 install :: nlms FORCE
292
293 #
294 # Any specialized rules here
295 #
296
297 #
298 # Include the 'tail' makefile that has targets that depend on variables defined
299 # in this makefile
300 #
301
302 include $(AP_WORK)\build\NWGNUtail.inc
303