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