upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / NWGNUmakefile
1 #
2 # Define our required macro's if not already done.
3 #
4
5 ifndef AP_WORK
6 export AP_WORK = $(CURDIR)
7 endif
8
9 ifndef APR_WORK
10 ifeq "$(wildcard $(AP_WORK)/srclib/apr)" "$(AP_WORK)/srclib/apr"
11 export APR_WORK = $(AP_WORK)/srclib/apr
12 endif
13 endif
14 ifneq "$(wildcard $(APR_WORK)/include/apr_version.h)" "$(APR_WORK)/include/apr_version.h"
15 $(error APR_WORK does not point to a valid APR source tree) 
16 endif
17
18 ifndef APU_WORK
19 ifeq "$(wildcard $(AP_WORK)/srclib/apr-util)" "$(AP_WORK)/srclib/apr-util"
20 export APU_WORK = $(AP_WORK)/srclib/apr-util
21 endif
22 endif
23 ifndef APU_WORK
24 ifeq "$(wildcard $(APR_WORK)/include/apu_version.h)" "$(APR_WORK)/include/apu_version.h"
25 export APU_WORK = $(APR_WORK)
26 endif
27 endif
28 ifneq "$(wildcard $(APU_WORK)/include/apu_version.h)" "$(APU_WORK)/include/apu_version.h"
29 $(error APU_WORK does not point to a valid APU source tree) 
30 endif
31
32 #
33 # Declare the sub-directories to be built here
34 #
35
36 SUBDIRS = \
37         $(APR_WORK) \
38         build \
39         support \
40         modules \
41         $(EOLIST) 
42
43 #
44 # Get the 'head' of the build environment.  This includes default targets and
45 # paths to tools
46 #
47
48 include $(AP_WORK)\build\NWGNUhead.inc
49
50 #
51 # build this level's files
52
53 #
54 # Make sure all needed macro's are defined
55 #
56
57 #
58 # These directories will be at the beginning of the include list, followed by
59 # INCDIRS
60 #
61 XINCDIRS        += \
62                         $(APR)/include \
63                         $(APRUTIL)/include \
64                         $(AP_WORK)/include \
65                         $(AP_WORK)/modules/filters/ \
66                         $(AP_WORK)/modules/generators/ \
67                         $(AP_WORK)/modules/http/ \
68                         $(AP_WORK)/modules/loggers/ \
69                         $(AP_WORK)/modules/mappers/ \
70                         $(AP_WORK)/modules/proxy/ \
71                         $(AP_WORK)/server/mpm/NetWare \
72                         $(PCRE) \
73                         $(NWOS) \
74                         $(EOLIST)
75
76 #
77 # These flags will come after CFLAGS
78 #
79 XCFLAGS         += \
80                         $(EOLIST)
81
82 #
83 # These defines will come after DEFINES
84 #
85 XDEFINES        += \
86                         $(EOLIST)
87
88 #
89 # These flags will be added to the link.opt file
90 #
91 XLFLAGS         += \
92                         $(EOLIST)
93
94 #
95 # These values will be appended to the correct variables based on the value of
96 # RELEASE
97 #
98 ifeq "$(RELEASE)" "debug"
99 XINCDIRS        += \
100                         $(EOLIST)
101
102 XCFLAGS         += \
103                         $(EOLIST)
104
105 XDEFINES        += \
106                         $(EOLIST)
107
108 XLFLAGS         += \
109                         $(EOLIST)
110 endif
111
112 ifeq "$(RELEASE)" "noopt"
113 XINCDIRS        += \
114                         $(EOLIST)
115
116 XCFLAGS         += \
117                         $(EOLIST)
118
119 XDEFINES        += \
120                         $(EOLIST)
121
122 XLFLAGS         += \
123                         $(EOLIST)
124 endif
125
126 ifeq "$(RELEASE)" "release"
127 XINCDIRS        += \
128                         $(EOLIST)
129
130 XCFLAGS         += \
131                         $(EOLIST)
132
133 XDEFINES        += \
134                         $(EOLIST)
135
136 XLFLAGS         += \
137                         $(EOLIST)
138 endif
139
140 #
141 # These are used by the link target if an NLM is being generated
142 # This is used by the link 'name' directive to name the nlm.  If left blank
143 # TARGET_nlm (see below) will be used.
144 #
145 NLM_NAME                = Apache2
146
147 #
148 # This is used by the link '-desc ' directive. 
149 # If left blank, NLM_NAME will be used.
150 #
151 NLM_DESCRIPTION         = Apache Web Server $(VERSION_STR)
152
153 #
154 # This is used by the '-threadname' directive.  If left blank,
155 # NLM_NAME Thread will be used.
156 #
157 NLM_THREAD_NAME = Apache
158
159 #
160 # This is used by the '-screenname' directive.  If left blank,
161 # 'Apache for NetWare' Thread will be used.
162 #
163 NLM_SCREEN_NAME = Apache $(VERSION_STR) for NetWare
164
165 #
166 # If this is specified, it will override VERSION value in 
167 # $(AP_WORK)\build\NWGNUenvironment.inc
168 #
169 NLM_VERSION             =
170
171 #
172 # If this is specified, it will override the default of 64K
173 #
174 NLM_STACK_SIZE  = 65536
175  
176
177 #
178 # If this is specified it will be used by the link '-entry' directive
179 #
180 NLM_ENTRY_SYM   = _LibCPrelude
181
182 #
183 # If this is specified it will be used by the link '-exit' directive
184 #
185 NLM_EXIT_SYM    = _LibCPostlude
186
187 #
188 # If this is specified it will be used by the link '-check' directive
189 #
190 NLM_CHECK_SYM   = _LibCCheckUnload
191
192 #
193 # If these are specified it will be used by the link '-flags' directive
194 #
195 NLM_FLAGS               =  PSEUDOPREEMPTION
196
197 #
198 # If this is specified it will be linked in with the XDCData option in the def 
199 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
200 # by setting APACHE_UNIPROC in the environment
201 #
202 XDCDATA         = 
203
204 #
205 # If there is an NLM target, put it here
206 #
207 TARGET_nlm = \
208         $(OBJDIR)/Apache2.nlm \
209         $(EOLIST)
210
211 #
212 # If there is an LIB target, put it here
213 #
214 TARGET_lib = \
215         $(EOLIST)
216
217 #
218 # These are the OBJ files needed to create the NLM target above.
219 # Paths must all use the '/' character
220 #
221 FILES_nlm_objs = \
222         $(OBJDIR)/buildmark.o \
223         $(OBJDIR)/config.o \
224         $(OBJDIR)/connection.o \
225         $(OBJDIR)/core.o \
226         $(OBJDIR)/eoc_bucket.o \
227         $(OBJDIR)/error_bucket.o \
228         $(OBJDIR)/http_core.o \
229         $(OBJDIR)/http_protocol.o \
230         $(OBJDIR)/http_request.o \
231         $(OBJDIR)/listen.o \
232         $(OBJDIR)/log.o \
233         $(OBJDIR)/main.o \
234         $(OBJDIR)/mod_access.o \
235         $(OBJDIR)/mod_actions.o \
236         $(OBJDIR)/mod_alias.o \
237         $(OBJDIR)/mod_asis.o \
238         $(OBJDIR)/mod_auth.o \
239         $(OBJDIR)/mod_autoindex.o \
240         $(OBJDIR)/mod_cgi.o \
241         $(OBJDIR)/mod_dir.o \
242         $(OBJDIR)/mod_env.o \
243         $(OBJDIR)/mod_imap.o \
244         $(OBJDIR)/mod_include.o \
245         $(OBJDIR)/mod_log_config.o \
246         $(OBJDIR)/mod_mime.o \
247         $(OBJDIR)/mod_negotiation.o \
248         $(OBJDIR)/mod_netware.o \
249         $(OBJDIR)/mod_nw_ssl.o \
250         $(OBJDIR)/mod_setenvif.o \
251         $(OBJDIR)/mod_so.o \
252         $(OBJDIR)/mod_userdir.o \
253         $(OBJDIR)/modules.o \
254         $(OBJDIR)/mpm_common.o \
255         $(OBJDIR)/mpm_netware.o \
256         $(OBJDIR)/pcre.o \
257         $(OBJDIR)/pcreposix.o \
258         $(OBJDIR)/protocol.o \
259         $(OBJDIR)/provider.o \
260         $(OBJDIR)/request.o \
261         $(OBJDIR)/rfc1413.o \
262         $(OBJDIR)/scoreboard.o \
263         $(OBJDIR)/util.o \
264         $(OBJDIR)/util_cfgtree.o \
265         $(OBJDIR)/util_charset.o \
266         $(OBJDIR)/util_debug.o \
267         $(OBJDIR)/util_filter.o \
268         $(OBJDIR)/util_md5.o \
269         $(OBJDIR)/util_nw.o \
270         $(OBJDIR)/util_script.o \
271         $(OBJDIR)/util_time.o \
272         $(OBJDIR)/util_xml.o \
273         $(OBJDIR)/vhost.o \
274         $(EOLIST)
275
276 #
277 # These are the LIB files needed to create the NLM target above.
278 # These will be added as a library command in the link.opt file.
279 #
280 FILES_nlm_libs = \
281         libcpre.o \
282         $(EOLIST)
283
284 #
285 # These are the modules that the above NLM target depends on to load.
286 # These will be added as a module command in the link.opt file.
287 #
288 FILES_nlm_modules = \
289         aprlib \
290         Libc \
291         $(EOLIST)
292
293 #
294 # If the nlm has a msg file, put it's path here
295 #
296 FILE_nlm_msg =
297  
298 #
299 # If the nlm has a hlp file put it's path here
300 #
301 FILE_nlm_hlp =
302
303 #
304 # If this is specified, it will override $(NWOS)\copyright.txt.
305 #
306 FILE_nlm_copyright =
307
308 #
309 # Any additional imports go here
310 #
311 FILES_nlm_Ximports = \
312         @netware.imp \
313         @$(APR)/aprlib.imp \
314         @libc.imp \
315         @ws2nlm.imp \
316         GetCurrentAddressSpace \
317         $(EOLIST)
318  
319 #   
320 # Any symbols exported to here
321 #
322 FILES_nlm_exports = \
323         @$(NWOS)/httpd.imp \
324         $(EOLIST)
325         
326 #   
327 # These are the OBJ files needed to create the LIB target above.
328 # Paths must all use the '/' character
329 #
330 FILES_lib_objs = \
331                 $(EOLIST)
332
333 #
334 # implement targets and dependancies (leave this section alone)
335 #
336
337 libs :: $(OBJDIR) $(TARGET_lib)
338
339 nlms :: libs $(TARGET_nlm)
340
341 #
342 # Updated this target to create necessary directories and copy files to the 
343 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
344 #
345 install :: nlms FORCE
346         -copy $(OBJDIR)\Apache2.nlm     $(INSTALL)\Apache2\*.*
347         -copy ABOUT_APACHE              $(INSTALL)\Apache2\*.*
348         -copy README                    $(INSTALL)\Apache2\*.*
349         -copy STATUS                    $(INSTALL)\Apache2\*.*
350         -copy LICENSE                   $(INSTALL)\Apache2\*.*
351         -copy CHANGES                   $(INSTALL)\Apache2\*.*
352         -copy support\dbmmanage.in      $(INSTALL)\Apache2\bin\dbmmanage.pl
353         -copy support\logresolve.pl.in  $(INSTALL)\Apache2\bin\logresolve.pl
354         -copy support\check_forensic    $(INSTALL)\Apache2\bin\check_forensic
355         -awk  -f build\mkconfnw.awk docs\conf\httpd-std.conf.in >$(INSTALL)\Apache2\conf\httpd.conf
356         -copy docs\conf\magic           $(INSTALL)\Apache2\conf\magic
357         -copy docs\conf\mime.types      $(INSTALL)\Apache2\conf\mime.types
358         -copy docs\cgi-examples\printenv $(INSTALL)\Apache2\cgi-bin\printenv.pl
359         @echo rem copying the docs directories > xc.bat
360         @echo xcopy docs\error $(INSTALL)\Apache2\error $(XCOPYSW) >> xc.bat
361         @echo xcopy docs\docroot $(INSTALL)\Apache2\htdocs $(XCOPYSW) >> xc.bat
362         @echo xcopy docs\icons $(INSTALL)\Apache2\icons $(XCOPYSW) >> xc.bat
363         @echo xcopy docs\man $(INSTALL)\Apache2\man $(XCOPYSW) >> xc.bat
364         @echo xcopy docs\manual $(INSTALL)\Apache2\manual $(XCOPYSW) >> xc.bat
365         $(CMD) xc.bat
366         $(DEL) xc.bat
367
368
369     
370 installdev :: FORCE
371         -copy $(subst /,\,$(AP_WORK))\include\*.h           $(INSTALL)\Apache2\include\*.*
372         -copy $(subst /,\,$(AP_WORK))\os\netware\*.h        $(INSTALL)\Apache2\include\*.*
373         -copy $(subst /,\,$(NWOS))\*.imp                    $(INSTALL)\Apache2\lib\*.*
374         -copy $(subst /,\,$(APR))\include\*.h               $(INSTALL)\Apache2\include\*.*
375         -copy $(subst /,\,$(APRUTIL))\include\*.h           $(INSTALL)\Apache2\include\*.*
376         -copy $(subst /,\,$(APR))\*.imp                     $(INSTALL)\Apache2\lib\*.*
377         -copy $(subst /,\,$(NWOS))\*.xdc                    $(INSTALL)\Apache2\lib\*.*
378     
379 #
380 # Any specialized rules here
381 #
382
383 $(OBJDIR)/%.o: server/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
384         @echo compiling $<
385         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
386
387 $(OBJDIR)/%.o: modules/arch/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
388         @echo compiling $<
389         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
390
391 $(OBJDIR)/%.o: modules/http/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
392         @echo compiling $<
393         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
394
395 $(OBJDIR)/%.o: modules/aaa/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
396         @echo compiling $<
397         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
398
399 $(OBJDIR)/%.o: modules/mappers/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
400         @echo compiling $<
401         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
402
403 $(OBJDIR)/%.o: modules/generators/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
404         @echo compiling $<
405         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
406
407 $(OBJDIR)/%.o: modules/metadata/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
408         @echo compiling $<
409         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
410
411 $(OBJDIR)/%.o: modules/filters/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
412         @echo compiling $<
413         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
414
415 $(OBJDIR)/%.o: modules/loggers/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
416         @echo compiling $<
417         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
418
419 $(OBJDIR)/%.o: os/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
420         @echo compiling $<
421         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
422
423 $(OBJDIR)/%.o: server/mpm/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
424         @echo compiling $<
425         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
426
427 $(OBJDIR)/%.o: srclib/pcre/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
428         @echo compiling $<
429         $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
430
431 #
432 # Include the 'tail' makefile that has targets that depend on variables defined
433 # in this makefile
434 #
435
436 include $(AP_WORK)\build\NWGNUtail.inc
437