From: Guenter Knauf Date: Sat, 18 Jul 2009 16:54:13 +0000 (+0000) Subject: enable building the NetWare build helpers for running on Win32. X-Git-Tag: 2.3.3~434 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c325b625913c54b8dd5db6994c23112a52c18078;p=apache enable building the NetWare build helpers for running on Win32. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795396 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc index ad69d3ff12..4f37c08b2b 100644 --- a/build/NWGNUenvironment.inc +++ b/build/NWGNUenvironment.inc @@ -129,6 +129,7 @@ CC = mwccnlm CPP = mwccnlm LINK = mwldnlm LIB = mwldnlm -type library -w nocmdline +WIN_CC = mwcc # Setup build tools AWK = awk @@ -169,13 +170,17 @@ else VERSION_SKT = (WINSOCK) endif -# # MetroWerks static Libraries - CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib MATH3S = PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib +# MetroWerks Win32 build flags to create build tool +WIN_CFLAGS = -O2 -gccinc -nodefaults -proc 586 -w off +WIN_CFLAGS += -ir "$(METROWERKS)/MSL" -ir "$(METROWERKS)/Win32-x86 Support" +WIN_CFLAGS += -lr "$(METROWERKS)/MSL" -lr "$(METROWERKS)/Win32-x86 Support" +WIN_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib + # Base compile flags # and prefix or precompiled header added here. diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile index b4ae3a2147..f74e92b737 100644 --- a/build/NWGNUmakefile +++ b/build/NWGNUmakefile @@ -17,11 +17,12 @@ include $(AP_WORK)\build\NWGNUhead.inc # build this level's files FILES_prebuild_headers = \ + $(NWOS)/test_char.h \ $(PCRE)/config.h \ $(PCRE)/pcre.h \ $(EOLIST) -nlms :: chkapr $(NWOS)/httpd.imp +nlms :: chkapr $(NWOS)/httpd.imp $(NWOS)/chartables.c $(NWOS)/httpd.imp : make_nw_export.awk nw_export.i @echo Generating $(subst /,\,$@) @@ -53,6 +54,36 @@ $(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 $(abspath $(NWOS)/chartables.c) not found!) +endif + +ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h" +$(error Error: required header $(abspath $(NWOS)/test_char.h) not found!) +endif + +endif + # # Check for minimum APR version # @@ -67,12 +98,18 @@ chkapr: $(APR)\build\nw_ver.awk $(APR)\include\apr_version.h install :: nlms FORCE clean :: - $(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 + $(CHK) nw_export.i $(DEL) nw_export.i + $(CHK) cc.opt $(DEL) cc.opt + $(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc +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