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