]> granicus.if.org Git - apache/blob - build/NWGNUmakefile
NetWare build overhaul in order to compile on Linux.
[apache] / build / NWGNUmakefile
1 #
2 # Declare the sub-directories to be built here
3 #
4
5 SUBDIRS = \
6         $(APR_WORK)/build \
7         $(EOLIST) 
8
9 #
10 # Get the 'head' of the build environment.  This includes default targets and
11 # paths to tools
12 #
13
14 include $(AP_WORK)/build/NWGNUhead.inc
15
16 #
17 # build this level's files
18
19 FILES_prebuild_headers = \
20         $(NWOS)/test_char.h \
21         $(PCRE)/config.h \
22         $(PCRE)/pcre.h \
23         $(EOLIST) 
24     
25 nlms :: chkapr $(NWOS)/httpd.imp $(NWOS)/chartables.c
26
27 $(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
28         @echo $(DL)GEN  $@$(DL)
29         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | $(SORT) >$@
30     
31 nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
32         @echo $(DL)GEN  $@$(DL)
33         $(CC) $< @cc.opt
34
35 cc.opt : NWGNUmakefile $(APBUILD)/NWGNUenvironment.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUhead.inc
36         @echo $(DL)-P$(DL)> $@
37         @echo $(DL)-EP$(DL)>> $@
38         @echo $(DL)-nosyspath$(DL)>> $@
39         @echo $(DL)-w nocmdline$(DL)>> $@
40         @echo $(DL)$(DEFINES)$(DL)>> $@
41         @echo $(DL)-I$(SRC)/include$(DL)>> $@
42         @echo $(DL)-I$(HTTPD)$(DL)>> $@
43         @echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
44         @echo $(DL)-I$(STDMOD)/core$(DL)>> $@
45         @echo $(DL)-I$(NWOS)$(DL)>> $@
46         @echo $(DL)-I$(SERVER)/mpm/netware$(DL)>> $@
47         @echo $(DL)-I$(APR)/include$(DL)>> $@
48         @echo $(DL)-I$(APRUTIL)/include$(DL)>> $@
49         @echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
50
51 $(PCRE)/%.h: $(PCRE)/%.h.generic
52         @echo Creating $@
53         $(call COPY,$<,$@)
54
55 $(PCRE)/%.h: $(PCRE)/%.hw
56         @echo Creating $@
57         $(call COPY,$<,$@)
58
59 ifneq "$(BUILDTOOL_AS_NLM)" "1"
60
61 $(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
62         @echo $(DL)GEN  $@$(DL)
63         @$< $@
64
65 %.exe: $(PCRE)/%.c
66         @echo $(DL)Creating Build Helper $@$(DL)
67         @$(WIN_CC) $(WIN_CFLAGS) -DHAVE_CONFIG_H $< -o $@
68
69 $(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c
70         @echo $(DL)GEN  $@$(DL)
71         @$< > $@
72
73 %.exe: $(SERVER)/%.c
74         @echo $(DL)Creating Build Helper $@$(DL)
75         @$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
76
77 else
78
79 ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
80 $(error Error: required source $(NWOS)/chartables.c not found!)
81 endif
82
83 ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
84 $(error Error: required header $(NWOS)/test_char.h not found!)
85 endif
86
87 endif
88
89 #
90 # Check for minimum APR version
91 #
92 chkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
93         @echo $(DL)Checking for APR version...$(DL)
94         @$(AWK) -v WANTED=$(APR_WANTED) -f $^
95
96 #
97 # You can use this target if all that is needed is to copy files to the
98 # installation area
99 #
100 install :: nlms FORCE
101
102 clean ::
103         $(call DEL,$(PCRE)/config.h)
104         $(call DEL,$(PCRE)/pcre.h)
105         $(call DEL,$(NWOS)/httpd.imp)
106         $(call DEL,nw_export.i)
107         $(call DEL,cc.opt)
108         $(call DEL,NWGNUversion.inc)
109 ifneq "$(BUILDTOOL_AS_NLM)" "1"
110         $(call DEL,$(NWOS)/chartables.c)
111         $(call DEL,$(NWOS)/test_char.h)
112         $(call DEL,dftables.exe)
113         $(call DEL,gen_test_char.exe)
114 endif
115
116 #
117 # Include the 'tail' makefile that has targets that depend on variables defined
118 # in this makefile
119 #
120
121 include $(APBUILD)/NWGNUtail.inc
122