]> granicus.if.org Git - apache/blob - build/NWGNUmakefile
NetWare build fixes.
[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         $(SRC)/include/ap_config_layout.h \
21         $(NWOS)/test_char.h \
22         $(PCRE)/config.h \
23         $(PCRE)/pcre.h \
24         $(EOLIST) 
25     
26 nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp $(STDMOD)/cache/mod_cache.imp
27
28 libs :: chkapr $(NWOS)/chartables.c
29
30 $(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h
31         @echo $(DL)GEN  $@$(DL)
32         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
33
34 $(STDMOD)/cache/mod_cache.imp: make_nw_export.awk $(STDMOD)/cache/mod_cache.h $(STDMOD)/cache/cache_util.h
35         @echo $(DL)GEN  $@$(DL)
36         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
37
38 $(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
39         @echo $(DL)GEN  $@$(DL)
40         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
41     
42 nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
43         @echo $(DL)GEN  $@$(DL)
44         $(CC) $< @cc.opt
45
46 cc.opt : NWGNUmakefile $(APBUILD)/NWGNUenvironment.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUhead.inc
47         @echo $(DL)-P$(DL)> $@
48         @echo $(DL)-EP$(DL)>> $@
49         @echo $(DL)-nosyspath$(DL)>> $@
50         @echo $(DL)-w nocmdline$(DL)>> $@
51         @echo $(DL)$(DEFINES)$(DL)>> $@
52         @echo $(DL)-I$(SRC)/include$(DL)>> $@
53         @echo $(DL)-I$(HTTPD)$(DL)>> $@
54         @echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
55         @echo $(DL)-I$(STDMOD)/core$(DL)>> $@
56         @echo $(DL)-I$(NWOS)$(DL)>> $@
57         @echo $(DL)-I$(SERVER)/mpm/netware$(DL)>> $@
58         @echo $(DL)-I$(APR)/include$(DL)>> $@
59         @echo $(DL)-I$(APRUTIL)/include$(DL)>> $@
60         @echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
61
62 $(SRC)/include/ap_config_layout.h: $(NWOS)/netware_config_layout.h
63         @echo Creating $@
64         $(call COPY,$<,$@)
65
66 $(PCRE)/%.h: $(PCRE)/%.h.generic
67         @echo Creating $@
68         $(call COPY,$<,$@)
69
70 $(PCRE)/%.h: $(PCRE)/%.hw
71         @echo Creating $@
72         $(call COPY,$<,$@)
73
74 ifneq "$(BUILDTOOL_AS_NLM)" "1"
75
76 $(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c
77         @echo $(DL)GEN  $@$(DL)
78         $< $@
79
80 %.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h
81         @echo $(DL)Creating Build Helper $@$(DL)
82         $(HOST_CC) $(HOST_CFLAGS) -DHAVE_CONFIG_H $< -o $@
83
84 $(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c
85         @echo $(DL)GEN  $@$(DL)
86         $< > $@
87
88 %.exe: $(SERVER)/%.c
89         @echo $(DL)Creating Build Helper $@$(DL)
90         $(HOST_CC) $(HOST_CFLAGS) -DCROSS_COMPILE $< -o $@
91
92 else
93
94 ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
95 $(error Error: required source $(NWOS)/chartables.c not found!)
96 endif
97
98 ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
99 $(error Error: required header $(NWOS)/test_char.h not found!)
100 endif
101
102 endif
103
104 #
105 # Check for minimum APR version
106 #
107 chkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
108         @echo $(DL)Checking for APR version...$(DL)
109         $(AWK) -v WANTED=$(APR_WANTED) -f $^
110
111 #
112 # You can use this target if all that is needed is to copy files to the
113 # installation area
114 #
115 install :: nlms FORCE
116
117 clean ::
118         $(call DEL,$(SRC)/include/ap_config_layout.h)
119         $(call DEL,$(PCRE)/config.h)
120         $(call DEL,$(PCRE)/pcre.h)
121         $(call DEL,$(STDMOD)/cache/mod_cache.imp)
122         $(call DEL,$(DAV)/main/dav.imp)
123         $(call DEL,$(NWOS)/httpd.imp)
124         $(call DEL,nw_export.i)
125         $(call DEL,cc.opt)
126         $(call DEL,NWGNUversion.inc)
127 ifneq "$(BUILDTOOL_AS_NLM)" "1"
128         $(call DEL,$(NWOS)/chartables.c)
129         $(call DEL,$(NWOS)/test_char.h)
130         $(call DEL,dftables.exe)
131         $(call DEL,gen_test_char.exe)
132 endif
133
134 #
135 # Include the 'tail' makefile that has targets that depend on variables defined
136 # in this makefile
137 #
138
139 include $(APBUILD)/NWGNUtail.inc
140