]> granicus.if.org Git - apache/commitdiff
enable building the NetWare build helpers for running on Win32.
authorGuenter Knauf <fuankg@apache.org>
Sat, 18 Jul 2009 16:54:13 +0000 (16:54 +0000)
committerGuenter Knauf <fuankg@apache.org>
Sat, 18 Jul 2009 16:54:13 +0000 (16:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795396 13f79535-47bb-0310-9956-ffa450edef68

build/NWGNUenvironment.inc
build/NWGNUmakefile

index ad69d3ff1287185ed800284ab1027aaf135df732..4f37c08b2b621003427142b59076fb6b92ae7d10 100644 (file)
@@ -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.
 
index b4ae3a2147a0621dc5e9ac3a5123b18c2058731b..f74e92b7371205ce22b9601017e9f303bd6dcb70 100644 (file)
@@ -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