~ubuntu-branches/ubuntu/karmic/apache2/karmic-updates

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