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