]> granicus.if.org Git - apache/blob - NWGNUmakefile
generated files
[apache] / 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                         $(STDMOD)/aaa \
66                         $(STDMOD)/core \
67                         $(STDMOD)/filters \
68                         $(STDMOD)/generators \
69                         $(STDMOD)/http \
70                         $(STDMOD)/loggers \
71                         $(STDMOD)/mappers \
72                         $(STDMOD)/proxy \
73                         $(STDMOD)/ssl \
74                         $(AP_WORK)/server \
75                         $(AP_WORK)/server/mpm/netware \
76                         $(PCRE) \
77                         $(NWOS) \
78                         $(EOLIST)
79
80 #
81 # These flags will come after CFLAGS
82 #
83 XCFLAGS         += \
84                         -DHAVE_CONFIG_H \
85                         $(EOLIST)
86
87 #
88 # These defines will come after DEFINES
89 #
90 XDEFINES        += \
91                         $(EOLIST)
92
93 #
94 # These flags will be added to the link.opt file
95 #
96 XLFLAGS         += \
97                         $(EOLIST)
98
99 #
100 # These values will be appended to the correct variables based on the value of
101 # RELEASE
102 #
103 ifeq "$(RELEASE)" "debug"
104 XINCDIRS        += \
105                         $(EOLIST)
106
107 XCFLAGS         += \
108                         $(EOLIST)
109
110 XDEFINES        += \
111                         $(EOLIST)
112
113 XLFLAGS         += \
114                         $(EOLIST)
115 endif
116
117 ifeq "$(RELEASE)" "noopt"
118 XINCDIRS        += \
119                         $(EOLIST)
120
121 XCFLAGS         += \
122                         $(EOLIST)
123
124 XDEFINES        += \
125                         $(EOLIST)
126
127 XLFLAGS         += \
128                         $(EOLIST)
129 endif
130
131 ifeq "$(RELEASE)" "release"
132 XINCDIRS        += \
133                         $(EOLIST)
134
135 XCFLAGS         += \
136                         $(EOLIST)
137
138 XDEFINES        += \
139                         $(EOLIST)
140
141 XLFLAGS         += \
142                         $(EOLIST)
143 endif
144
145 #
146 # These are used by the link target if an NLM is being generated
147 # This is used by the link 'name' directive to name the nlm.  If left blank
148 # TARGET_nlm (see below) will be used.
149 #
150 NLM_NAME        = Apache2
151
152 #
153 # This is used by the link '-desc ' directive.
154 # If left blank, NLM_NAME will be used.
155 #
156 NLM_DESCRIPTION = Apache Web Server $(VERSION_STR) $(VERSION_SKT)
157
158 #
159 # This is used by the '-threadname' directive.  If left blank,
160 # NLM_NAME Thread will be used.
161 #
162 NLM_THREAD_NAME = $(NLM_NAME)
163
164 #
165 # This is used by the '-screenname' directive.  If left blank,
166 # 'Apache for NetWare' Thread will be used.
167 #
168 NLM_SCREEN_NAME = Apache $(VERSION_STR) for NetWare
169
170
171 #
172 # If this is specified, it will override VERSION value in
173 # $(AP_WORK)\build\NWGNUenvironment.inc
174 #
175 NLM_VERSION     =
176
177 #
178 # If this is specified, it will override the default of 64K
179 #
180 NLM_STACK_SIZE  = 65536
181
182
183 #
184 # If this is specified it will be used by the link '-entry' directive
185 #
186 NLM_ENTRY_SYM   = _LibCPrelude
187
188 #
189 # If this is specified it will be used by the link '-exit' directive
190 #
191 NLM_EXIT_SYM    = _LibCPostlude
192
193 #
194 # If this is specified it will be used by the link '-check' directive
195 #
196 NLM_CHECK_SYM   = _LibCCheckUnload
197
198 #
199 # If these are specified it will be used by the link '-flags' directive
200 #
201 NLM_FLAGS       = PSEUDOPREEMPTION
202
203 #
204 # If this is specified it will be linked in with the XDCData option in the def
205 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
206 # by setting APACHE_UNIPROC in the environment
207 #
208 XDCDATA         =
209
210 #
211 # If there is an NLM target, put it here
212 #
213 TARGET_nlm = \
214         $(OBJDIR)/$(NLM_NAME).nlm \
215         $(EOLIST)
216
217 #
218 # If there is an LIB target, put it here
219 #
220 TARGET_lib = \
221         $(OBJDIR)/pcre.lib \
222         $(EOLIST)
223
224 #
225 # These are the OBJ files needed to create the NLM target above.
226 # Paths must all use the '/' character
227 #
228 FILES_nlm_objs = \
229         $(OBJDIR)/buildmark.o \
230         $(OBJDIR)/config.o \
231         $(OBJDIR)/connection.o \
232         $(OBJDIR)/core.o \
233         $(OBJDIR)/core_filters.o \
234         $(OBJDIR)/eoc_bucket.o \
235         $(OBJDIR)/eor_bucket.o \
236         $(OBJDIR)/error_bucket.o \
237         $(OBJDIR)/http_core.o \
238         $(OBJDIR)/http_protocol.o \
239         $(OBJDIR)/http_request.o \
240         $(OBJDIR)/byterange_filter.o \
241         $(OBJDIR)/chunk_filter.o \
242         $(OBJDIR)/http_etag.o \
243         $(OBJDIR)/http_filters.o \
244         $(OBJDIR)/listen.o \
245         $(OBJDIR)/log.o \
246         $(OBJDIR)/main.o \
247         $(OBJDIR)/mod_authn_core.o \
248         $(OBJDIR)/mod_authz_core.o \
249         $(OBJDIR)/mod_authz_host.o \
250         $(OBJDIR)/mod_alias.o \
251         $(OBJDIR)/mod_dir.o \
252         $(OBJDIR)/mod_env.o \
253         $(OBJDIR)/mod_include.o \
254         $(OBJDIR)/mod_log_config.o \
255         $(OBJDIR)/mod_mime.o \
256         $(OBJDIR)/mod_negotiation.o \
257         $(OBJDIR)/mod_netware.o \
258         $(OBJDIR)/mod_setenvif.o \
259         $(OBJDIR)/mod_so.o \
260         $(OBJDIR)/mod_watchdog.o \
261         $(OBJDIR)/modules.o \
262         $(OBJDIR)/mpm_common.o \
263         $(OBJDIR)/mpm_netware.o \
264         $(OBJDIR)/protocol.o \
265         $(OBJDIR)/provider.o \
266         $(OBJDIR)/request.o \
267         $(OBJDIR)/scoreboard.o \
268         $(OBJDIR)/util.o \
269         $(OBJDIR)/util_cfgtree.o \
270         $(OBJDIR)/util_charset.o \
271         $(OBJDIR)/util_cookies.o \
272         $(OBJDIR)/util_debug.o \
273         $(OBJDIR)/util_expr_eval.o \
274         $(OBJDIR)/util_expr_parse.o \
275         $(OBJDIR)/util_expr_scan.o \
276         $(OBJDIR)/util_filter.o \
277         $(OBJDIR)/util_md5.o \
278         $(OBJDIR)/util_mutex.o \
279         $(OBJDIR)/util_nw.o \
280         $(OBJDIR)/util_pcre.o \
281         $(OBJDIR)/util_regex.o \
282         $(OBJDIR)/util_script.o \
283         $(OBJDIR)/util_time.o \
284         $(OBJDIR)/util_xml.o \
285         $(OBJDIR)/vhost.o \
286         $(EOLIST)
287
288 # Build in mod_nw_ssl if Winsock is being used
289 ifndef USE_STDSOCKETS
290 FILES_nlm_objs += $(OBJDIR)/mod_nw_ssl.o \
291         $(EOLIST)
292 endif
293
294 #
295 # These are the LIB files needed to create the NLM target above.
296 # These will be added as a library command in the link.opt file.
297 #
298 FILES_nlm_libs = \
299         $(PCRELIB) \
300         libcpre.o \
301         $(EOLIST)
302
303 #
304 # These are the modules that the above NLM target depends on to load.
305 # These will be added as a module command in the link.opt file.
306 #
307 FILES_nlm_modules = \
308         aprlib \
309         Libc \
310         $(EOLIST)
311
312 #
313 # If the nlm has a msg file, put it's path here
314 #
315 FILE_nlm_msg =
316
317 #
318 # If the nlm has a hlp file put it's path here
319 #
320 FILE_nlm_hlp =
321
322 #
323 # If this is specified, it will override $(NWOS)\copyright.txt.
324 #
325 FILE_nlm_copyright =
326
327 #
328 # Any additional imports go here
329 #
330 FILES_nlm_Ximports = \
331         @netware.imp \
332         @$(APR)/aprlib.imp \
333         @libc.imp \
334         GetCurrentAddressSpace \
335         $(EOLIST)
336
337 # Don't link with Winsock if standard sockets are being used
338 ifndef USE_STDSOCKETS
339 FILES_nlm_Ximports += @ws2nlm.imp \
340         $(EOLIST)
341 endif
342
343 #
344 # Any symbols exported to here
345 #
346 FILES_nlm_exports = \
347         @$(NWOS)/httpd.imp \
348         $(EOLIST)
349
350 #
351 # These are the OBJ files needed to create the LIB target above.
352 # Paths must all use the '/' character
353 #
354 ifeq "$(wildcard $(PCRE)/pcre.c)" "$(PCRE)/pcre.c"
355
356 FILES_lib_objs = \
357         $(OBJDIR)/pcre.o \
358         $(EOLIST)
359
360 else
361
362 FILES_lib_objs = \
363         $(OBJDIR)/pcre_compile.o \
364         $(OBJDIR)/pcre_exec.o \
365         $(OBJDIR)/pcre_fullinfo.o \
366         $(OBJDIR)/pcre_globals.o \
367         $(OBJDIR)/pcre_info.o \
368         $(OBJDIR)/pcre_newline.o \
369         $(OBJDIR)/pcre_tables.o \
370         $(OBJDIR)/pcre_try_flipped.o \
371         $(OBJDIR)/pcre_version.o \
372         $(EOLIST)
373
374 endif
375
376 FILES_lib_objs += \
377         $(OBJDIR)/chartables.o \
378         $(EOLIST)
379
380 #
381 # implement targets and dependancies (leave this section alone)
382 #
383
384 libs :: $(OBJDIR) $(TARGET_lib)
385
386 nlms :: libs $(TARGET_nlm)
387
388 #
389 # Updated this target to create necessary directories and copy files to the
390 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
391 #
392 install :: nlms instscripts FORCE
393         -copy $(OBJDIR)\$(NLM_NAME).nlm  $(INSTALL)\$(BASEDIR)\*.*
394         -copy ABOUT_APACHE               $(INSTALL)\$(BASEDIR)\*.*
395         -copy CHANGES                    $(INSTALL)\$(BASEDIR)\*.*
396         -copy LICENSE                    $(INSTALL)\$(BASEDIR)\*.*
397         -copy README                     $(INSTALL)\$(BASEDIR)\*.*
398         -copy VERSIONING                 $(INSTALL)\$(BASEDIR)\*.*
399         -copy STATUS                     $(INSTALL)\$(BASEDIR)\*.*
400         -copy support\dbmmanage.in       $(INSTALL)\$(BASEDIR)\bin\dbmmanage.pl
401         -copy support\logresolve.pl.in   $(INSTALL)\$(BASEDIR)\bin\logresolve.pl
402         -copy support\split-logfile.in   $(INSTALL)\$(BASEDIR)\bin\split-logfile.pl
403         -copy support\check_forensic     $(INSTALL)\$(BASEDIR)\bin\check_forensic.sh
404         -copy docs\conf\magic            $(INSTALL)\$(BASEDIR)\conf\magic
405         -copy docs\conf\mime.types       $(INSTALL)\$(BASEDIR)\conf\mime.types
406         -copy docs\conf\charset.conv     $(INSTALL)\$(BASEDIR)\conf\charset.conv
407         -copy docs\cgi-examples\printenv $(INSTALL)\$(BASEDIR)\cgi-bin\printenv.pl
408         -$(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -v SSLPORT=$(SSLPORT) -v MODSSL=$(WITH_MOD_SSL) -v BSDSKT=$(USE_STDSOCKETS) -f build\mkconfnw.awk docs\conf\httpd.conf.in >$(INSTALL)\$(BASEDIR)\conf\httpd.conf
409         $(CHKNOT) $(INSTALL)\$(BASEDIR)\conf\extra\nul mkdir $(INSTALL)\$(BASEDIR)\conf\extra
410         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-autoindex.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-autoindex.conf
411         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-dav.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-dav.conf
412         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-default.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-default.conf
413         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-info.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-info.conf
414         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-languages.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-languages.conf
415         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-manual.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-manual.conf
416         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-mpm.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-mpm.conf
417         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-multilang-errordoc.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-multilang-errordoc.conf
418         -$(AWK) -v BDIR=$(BASEDIR) -f build\mkconfnw.awk docs\conf\extra\httpd-userdir.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-userdir.conf
419         -$(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -f build\mkconfnw.awk docs\conf\extra\httpd-vhosts.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-vhosts.conf
420         -$(AWK) -v BDIR=$(BASEDIR) -v SSLPORT=$(SSLPORT) -f build\mkconfnw.awk docs\conf\extra\httpd-ssl.conf.in >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-ssl.conf
421         @xcopy $(XCOPYSW) docs\error     $(INSTALL)\$(BASEDIR)\error
422         @xcopy $(XCOPYSW) docs\docroot   $(INSTALL)\$(BASEDIR)\htdocs
423         @xcopy $(XCOPYSW) docs\icons     $(INSTALL)\$(BASEDIR)\icons
424         @xcopy $(XCOPYSW) docs\man       $(INSTALL)\$(BASEDIR)\man
425         @xcopy $(XCOPYSW) docs\manual    $(INSTALL)\$(BASEDIR)\manual
426
427 installdev :: FORCE
428         -copy $(subst /,\,$(AP_WORK))\include\*.h  $(INSTALL)\$(BASEDIR)\include\*.*
429         -copy $(subst /,\,$(NWOS))\*.h             $(INSTALL)\$(BASEDIR)\include\*.*
430         -copy $(subst /,\,$(APR))\include\*.h      $(INSTALL)\$(BASEDIR)\include\*.*
431         -copy $(subst /,\,$(APRUTIL))\include\*.h  $(INSTALL)\$(BASEDIR)\include\*.*
432         -copy $(subst /,\,$(APR))\*.imp            $(INSTALL)\$(BASEDIR)\lib\*.*
433         -copy $(subst /,\,$(NWOS))\*.imp           $(INSTALL)\$(BASEDIR)\lib\*.*
434         -copy $(subst /,\,$(NWOS))\*.xdc           $(INSTALL)\$(BASEDIR)\lib\*.*
435
436 prebuild :: FORCE
437         $(MAKE) -C $(SERVER) -f NWGNUmakefile
438         $(MAKE) -C $(PCRE) -f NWGNUmakefile
439         $(CHKNOT) $(subst /,\,$(PREBUILD_INST))\nul mkdir $(subst /,\,$(PREBUILD_INST))
440         -copy $(AP_WORK)\server\$(OBJDIR)\*.nlm $(PREBUILD_INST)\*.*
441         -copy $(PCRE)\$(basename $(OBJDIR))\*.nlm $(PREBUILD_INST)\*.*
442
443 #
444 # Any specialized rules here
445 #
446
447 vpath %.c server:modules/arch/netware:modules/http:modules/aaa:modules/mappers
448 vpath %.c modules/generators:modules/metadata:modules/filters:modules/loggers
449 vpath %.c modules/core:os/netware:server/mpm/netware:$(PCRE)
450
451 #
452 # Include the 'tail' makefile that has targets that depend on variables defined
453 # in this makefile
454 #
455
456 include $(AP_WORK)\build\NWGNUtail.inc
457
458 include $(AP_WORK)\build\NWGNUscripts.inc
459
460