upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr / NWGNUmakefile
1 #
2 # Declare the sub-directories to be built here
3 #
4
5 SUBDIRS = \
6                 build \
7                 ..\apr-util \
8                 $(EOLIST) 
9
10 #
11 # Get the 'head' of the build environment.  This includes default targets and
12 # paths to tools
13 #
14
15 include $(APR_WORK)\build\NWGNUhead.inc
16
17 #
18 # build this level's files
19
20 #
21 # Make sure all needed macro's are defined
22 #
23
24 #
25 # These directories will be at the beginning of the include list, followed by
26 # INCDIRS
27 #
28 XINCDIRS        += \
29                         $(APR_WORK)/include \
30                         $(APR_WORK)/include/arch/NetWare \
31                         $(APR_WORK)/include/arch/unix \
32                         $(APR_WORK)/memory/unix \
33                         $(APRUTIL)/xml \
34                         $(EOLIST)
35
36 #
37 # These flags will come after CFLAGS
38 #
39 XCFLAGS         += \
40                         $(EOLIST)
41
42 #
43 # These defines will come after DEFINES
44 #
45 XDEFINES        += \
46                         $(EOLIST)
47
48 #
49 # These flags will be added to the link.opt file
50 #
51 XLFLAGS         += \
52                         $(EOLIST)
53
54 #
55 # These values will be appended to the correct variables based on the value of
56 # RELEASE
57 #
58 ifeq "$(RELEASE)" "debug"
59 XINCDIRS        += \
60                         $(EOLIST)
61
62 XCFLAGS         += \
63                         $(EOLIST)
64
65 XDEFINES        += \
66                         $(EOLIST)
67
68 XLFLAGS         += \
69                         $(EOLIST)
70 endif
71
72 ifeq "$(RELEASE)" "noopt"
73 XINCDIRS        += \
74                         $(EOLIST)
75
76 XCFLAGS         += \
77                         $(EOLIST)
78
79 XDEFINES        += \
80                         $(EOLIST)
81
82 XLFLAGS         += \
83                         $(EOLIST)
84 endif
85
86 ifeq "$(RELEASE)" "release"
87 XINCDIRS        += \
88                         $(EOLIST)
89
90 XCFLAGS         += \
91                         $(EOLIST)
92
93 XDEFINES        += \
94                         $(EOLIST)
95
96 XLFLAGS         += \
97                         $(EOLIST)
98 endif
99
100 #
101 # These are used by the link target if an NLM is being generated
102 # This is used by the link 'name' directive to name the nlm.  If left blank
103 # TARGET_nlm (see below) will be used.
104 #
105 NLM_NAME                = aprlib
106
107 #
108 # This is used by the link '-desc ' directive. 
109 # If left blank, NLM_NAME will be used.
110 #
111 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR)
112
113 #
114 # This is used by the '-threadname' directive.  If left blank,
115 # NLM_NAME Thread will be used.
116 #
117 NLM_THREAD_NAME = 
118 #
119 # If this is specified, it will override VERSION value in 
120 # $(APR_WORK)\build\NWGNUenvironment.inc
121 #
122 NLM_VERSION             =
123
124 #
125 # If this is specified, it will override the default of 64K
126 #
127 NLM_STACK_SIZE  = 
128
129 #
130 # If this is specified it will be used by the link '-entry' directive
131 #
132 NLM_ENTRY_SYM   = _LibCPrelude
133
134 #
135 # If this is specified it will be used by the link '-exit' directive
136 #
137 NLM_EXIT_SYM    = _LibCPostlude
138
139 #
140 # If this is specified it will be used by the link '-check' directive
141 #
142 NLM_CHECK_SYM   =
143
144 #
145 # If this is specified it will be used by the link '-flags' directive
146 #
147 NLM_FLAGS               = AUTOUNLOAD, PSEUDOPREEMPTION
148  
149 #
150 # If this is specified it will be linked in with the XDCData option in the def 
151 # file instead of the default of $(APR)/misc/netware/apache.xdc.  XDCData can 
152 # be disabled by setting APACHE_UNIPROC in the environment
153 #
154 XDCDATA         = 
155
156 #
157 # Declare all target files (you must add your files here)
158 #
159
160 #
161 # If there is an NLM target, put it here
162 #
163 TARGET_nlm = \
164         $(OBJDIR)/aprlib.nlm \
165         $(EOLIST)
166
167 #
168 # If there is an LIB target, put it here
169 #
170 TARGET_lib = \
171         $(OBJDIR)/aprlib.lib \
172         $(EOLIST)
173
174 #
175 # These are the OBJ files needed to create the NLM target above.
176 # Paths must all use the '/' character
177 #
178 FILES_nlm_objs = \
179         $(OBJDIR)/libprews.o \
180         $(EOLIST)
181
182 #
183 # These are the LIB files needed to create the NLM target above.
184 # These will be added as a library command in the link.opt file.
185 #
186 FILES_nlm_libs = \
187         libcpre.o \
188         $(APRLIB) \
189         $(APRUTLIB) \
190         $(XMLLIB) \
191         $(EOLIST)
192
193 #
194 # These are the modules that the above NLM target depends on to load.
195 # These will be added as a module command in the link.opt file.
196 #
197 FILES_nlm_modules = \
198         Libc \
199         ws2_32 \
200         $(EOLIST)
201
202 #
203 # If the nlm has a msg file, put it's path here
204 #
205 FILE_nlm_msg =
206  
207 #
208 # If the nlm has a hlp file put it's path here
209 #
210 FILE_nlm_hlp =
211
212 #
213 # If this is specified, it will override $(NWOS)\copyright.txt.
214 #
215 FILE_nlm_copyright =
216
217 #
218 # Any additional imports go here
219 #
220 FILES_nlm_Ximports = \
221         @libc.imp \
222         @ws2nlm.imp \
223         @netware.imp \
224         WSAStartupRTags \
225         WSACleanupRTag \
226         $(EOLIST)
227  
228 #   
229 # Any symbols exported to here
230 #
231 FILES_nlm_exports = \
232         @aprlib.imp     \
233         $(EOLIST)
234         
235 #   
236 # These are the OBJ files needed to create the LIB target above.
237 # Paths must all use the '/' character
238 #
239 FILES_lib_objs = \
240         $(OBJDIR)/apr_cpystrn.o \
241         $(OBJDIR)/apr_fnmatch.o \
242         $(OBJDIR)/apr_getpass.o \
243         $(OBJDIR)/apr_hash.o \
244         $(OBJDIR)/apr_pools.o \
245         $(OBJDIR)/apr_snprintf.o \
246         $(OBJDIR)/apr_strings.o \
247         $(OBJDIR)/apr_strnatcmp.o \
248         $(OBJDIR)/apr_strtok.o \
249         $(OBJDIR)/apr_tables.o \
250         $(OBJDIR)/charset.o \
251         $(OBJDIR)/copy.o \
252         $(OBJDIR)/common.o \
253         $(OBJDIR)/dir.o \
254         $(OBJDIR)/dso.o \
255         $(OBJDIR)/errorcodes.o \
256         $(OBJDIR)/env.o \
257         $(OBJDIR)/fileacc.o \
258         $(OBJDIR)/filedup.o \
259         $(OBJDIR)/filepath.o \
260         $(OBJDIR)/filepath_util.o \
261         $(OBJDIR)/filestat.o \
262         $(OBJDIR)/filesys.o \
263         $(OBJDIR)/flock.o \
264         $(OBJDIR)/fullrw.o \
265         $(OBJDIR)/getopt.o \
266         $(OBJDIR)/groupinfo.o \
267         $(OBJDIR)/inet_pton.o \
268         $(OBJDIR)/inet_ntop.o \
269         $(OBJDIR)/libprews.o \
270         $(OBJDIR)/mktemp.o \
271         $(OBJDIR)/mmap.o \
272         $(OBJDIR)/open.o \
273         $(OBJDIR)/pipe.o \
274         $(OBJDIR)/otherchild.o \
275         $(OBJDIR)/poll.o \
276         $(OBJDIR)/pollacc.o \
277         $(OBJDIR)/proc.o \
278         $(OBJDIR)/procsup.o \
279         $(OBJDIR)/proc_mutex.o \
280         $(OBJDIR)/rand.o \
281         $(OBJDIR)/readwrite.o \
282         $(OBJDIR)/seek.o \
283         $(OBJDIR)/sendrecv.o \
284         $(OBJDIR)/shm.o \
285         $(OBJDIR)/signals.o \
286         $(OBJDIR)/sockaddr.o \
287         $(OBJDIR)/sockets.o \
288         $(OBJDIR)/sockopt.o \
289         $(OBJDIR)/start.o \
290         $(OBJDIR)/tempdir.o \
291         $(OBJDIR)/thread.o \
292         $(OBJDIR)/thread_cond.o \
293         $(OBJDIR)/thread_mutex.o \
294         $(OBJDIR)/thread_rwlock.o \
295         $(OBJDIR)/threadpriv.o \
296         $(OBJDIR)/time.o \
297         $(OBJDIR)/timestr.o \
298         $(OBJDIR)/userinfo.o \
299         $(OBJDIR)/version.o \
300         $(OBJDIR)/waitio.o \
301         $(EOLIST)
302
303
304 #
305 # implement targets and dependancies (leave this section alone)
306 #
307
308 libs :: $(OBJDIR) $(TARGET_lib)
309
310 nlms :: libs $(TARGET_nlm)
311
312 #
313 # Updated this target to create necessary directories and copy files to the 
314 # correct place.  (See $(APR_WORK)\build\NWGNUhead.inc for examples)
315 #
316 install :: nlms $(INSTDIRS) FORCE
317         copy $(OBJDIR)\aprlib.nlm                          $(INSTALLBASE)\*.*
318 ifndef DEST
319         -copy $(subst /,\,$(APR))\STATUS                   $(INSTALLBASE)\*.apr
320         -copy $(subst /,\,$(APR))\LICENSE                  $(INSTALLBASE)\*
321         -copy $(subst /,\,$(APR))\CHANGES                  $(INSTALLBASE)\*.apr
322         -copy $(subst /,\,$(APRUTIL))\STATUS               $(INSTALLBASE)\*.apu
323         -copy $(subst /,\,$(APRUTIL))\CHANGES              $(INSTALLBASE)\*.apu
324         @echo rem copying the docs directories > xc.bat
325         @echo xcopy docs $(INSTALLBASE)\docs\*.* $(XCOPYSW) >> xc.bat
326         $(CMD) xc.bat
327         $(DEL) xc.bat
328         
329 endif   
330         
331 $(INSTDIRS) ::
332         $(CHKNOT) $@\NUL mkdir $@
333
334 ifndef DEST
335 installdev :: $(INSTDEVDIRS) FORCE
336         -copy $(subst /,\,$(APR))\include\*.h               $(INSTALLBASE)\include\*.*
337         -copy $(subst /,\,$(APRUTIL))\include\*.h           $(INSTALLBASE)\include\*.*
338         -copy $(subst /,\,$(APR))\*.imp                     $(INSTALLBASE)\lib\*.*
339         -copy $(subst /,\,$(APR))\misc\netware\*.xdc        $(INSTALLBASE)\lib\*.*
340         
341 $(INSTDEVDIRS) ::
342         $(CHKNOT) $@\NUL mkdir $@
343 endif   
344
345 #
346 # Any specialized rules here
347 #
348
349 $(OBJDIR)/%.o: strings/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
350         @echo Compiling $<
351         $(CC) strings\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
352
353 $(OBJDIR)/%.o: tables/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
354         @echo Compiling $<
355         $(CC) tables\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
356
357 $(OBJDIR)/%.o: passwd/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
358         @echo Compiling $<
359         $(CC) passwd\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
360
361 $(OBJDIR)/%.o: lib/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
362         @echo Compiling $<
363         $(CC) lib\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
364
365 $(OBJDIR)/%.o: time/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
366         @echo Compiling $<
367         $(CC) time\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
368
369 $(OBJDIR)/%.o: file_io/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
370         @echo Compiling $<
371         $(CC) file_io\netware\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
372
373 $(OBJDIR)/%.o: file_io/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
374         @echo Compiling $<
375         $(CC) file_io\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
376
377 $(OBJDIR)/%.o: locks/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
378         @echo Compiling $<
379         $(CC) locks\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
380
381 $(OBJDIR)/%.o: misc/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
382         @echo Compiling $<
383         $(CC) misc\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
384
385 $(OBJDIR)/%.o: misc/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
386         @echo Compiling $<
387         $(CC) misc\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
388
389 $(OBJDIR)/%.o: threadproc/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
390         @echo Compiling $<
391         $(CC) threadproc\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
392
393 $(OBJDIR)/%.o: dso/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
394         @echo Compiling $<
395         $(CC) dso\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
396
397 $(OBJDIR)/%.o: memory/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
398         @echo Compiling $<
399         $(CC) memory\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
400
401 $(OBJDIR)/%.o: mmap/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
402         @echo Compiling $<
403         $(CC) mmap\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
404
405 $(OBJDIR)/%.o: user/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
406         @echo Compiling $<
407         $(CC) user\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
408
409 $(OBJDIR)/%.o: network_io/win32/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
410         @echo Compiling $<
411         $(CC) network_io\win32\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
412
413 $(OBJDIR)/%.o: network_io/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
414         @echo Compiling $<
415         $(CC) network_io\unix\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
416         
417 $(OBJDIR)/%.o: poll/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
418         @echo Compiling $<
419         $(CC) poll\unix\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
420
421 $(OBJDIR)/%.o: file_io/os2/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
422         @echo Compiling $<
423         $(CC) file_io\os2\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
424
425 $(OBJDIR)/%.o: shmem/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
426         @echo Compiling $<
427         $(CC) shmem\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
428
429 $(OBJDIR)/%.o: support/unix/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
430         @echo Compiling $<
431         $(CC) support\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
432
433 #
434 # Include the 'tail' makefile that has targets that depend on variables defined
435 # in this makefile
436 #
437
438 include $(APR_WORK)\build\NWGNUtail.inc
439
440