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