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