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