summaryrefslogtreecommitdiff
path: root/build/NWGNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'build/NWGNUmakefile')
-rw-r--r--build/NWGNUmakefile61
1 files changed, 52 insertions, 9 deletions
diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile
index 423a73d9..fac1a828 100644
--- a/build/NWGNUmakefile
+++ b/build/NWGNUmakefile
@@ -19,15 +19,16 @@ FILES_prebuild_headers = \
$(APR)/include/apr.h \
$(APRUTIL)/include/apu.h \
$(APRUTIL)/include/apr_ldap.h \
+ $(NWOS)/test_char.h \
$(PCRE)/config.h \
$(PCRE)/pcre.h \
$(EOLIST)
-nlms :: $(NWOS)/httpd.imp
+nlms :: $(NWOS)/httpd.imp $(NWOS)/chartables.c
$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
@echo Generating $(subst /,\,$@)
- $(AWK) -f make_nw_export.awk nw_export.i | sort >$(NWOS)/httpd.imp
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | sort >$@
nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
@echo Generating $(subst /,\,$@)
@@ -62,19 +63,61 @@ $(PCRE)/%.h: $(subst /,\,$(PCRE))\%.hw
@echo Creating $(subst /,\,$@)
copy $< $(subst /,\,$(PCRE))\$(@F)
+ifneq "$(BUILDTOOL_AS_NLM)" "1"
+
+$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
+ @echo Creating $(subst /,\,$@)
+ @$< $@
+
+%.exe: $(PCRE)/%.c
+ @echo Creating Build Helper $@
+ @$(WIN_CC) $(WIN_CFLAGS) $< -o $@
+
+$(NWOS)/test_char.h: gen_test_char.exe $(AP_WORK)/server/gen_test_char.c
+ @echo Creating $(subst /,\,$@)
+ @$< > $@
+
+%.exe: $(AP_WORK)/server/%.c
+ @echo Creating Build Helper $@
+ @$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
+
+else
+
+ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
+$(error Error: required source $(NWOS)/chartables.c not found!)
+endif
+
+ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
+$(error Error: required header $(NWOS)/test_char.h not found!)
+endif
+
+endif
+
#
# You can use this target if all that is needed is to copy files to the
# installation area
#
install :: nlms FORCE
-
clean ::
- $(CHK) nw_export.i $(DEL) nw_export.i
- $(CHK) cc.opt $(DEL) cc.opt
- $(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc
- $(CHK) $(subst /,\,$(PCRE))\config.h $(DEL) $(subst /,\,$(PCRE))\config.h
- $(CHK) $(subst /,\,$(PCRE))\pcre.h $(DEL) $(subst /,\,$(PCRE))\pcre.h
- $(CHK) $(subst /,\,$(NWOS))\httpd.imp $(DEL) $(subst /,\,$(NWOS))\httpd.imp
+ $(CHK) nw_export.i $(DEL) nw_export.i
+ $(CHK) cc.opt $(DEL) cc.opt
+ $(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc
+ $(CHK) $(subst /,\,$(PCRE))\config.h $(DEL) $(subst /,\,$(PCRE))\config.h
+ $(CHK) $(subst /,\,$(PCRE))\pcre.h $(DEL) $(subst /,\,$(PCRE))\pcre.h
+ $(CHK) $(subst /,\,$(NWOS))\httpd.imp $(DEL) $(subst /,\,$(NWOS))\httpd.imp
$(MAKE) -C $(APR) -f NWGNUmakefile clean
+ifneq "$(BUILDTOOL_AS_NLM)" "1"
+ $(CHK) $(subst /,\,$(NWOS))\chartables.c $(DEL) $(subst /,\,$(NWOS))\chartables.c
+ $(CHK) $(subst /,\,$(NWOS))\test_char.h $(DEL) $(subst /,\,$(NWOS))\test_char.h
+ $(CHK) dftables.exe $(DEL) dftables.exe
+ $(CHK) gen_test_char.exe $(DEL) gen_test_char.exe
+endif
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(AP_WORK)\build\NWGNUtail.inc