adjust Windows cross-compile to use zlib/win32/Makefile.gcc

original commit: b4c583ad7259eabad7344d5dedc297c8414140a4
This commit is contained in:
Matthew Flatt 2019-03-19 15:29:20 -06:00
parent 4d0090bf7b
commit 2f65d585b2
3 changed files with 16 additions and 2 deletions

View File

@ -51,4 +51,6 @@ ${Kernel}: ${kernelobj} ../zlib/libz.a
$(LD) -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a $(LD) -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a
../zlib/configure.log: ../zlib/configure.log:
(cd ../zlib; env CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ./configure --uname=CYGWIN) echo "all:" >> ../zlib/Makefile
echo '\t$$(MAKE) -f win32/Makefile.gcc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" RC="$(WINDRES)"' >> ../zlib/Makefile
touch ../zlib/configure.log

View File

@ -51,4 +51,6 @@ ${Kernel}: ${kernelobj} ../zlib/libz.a
$(LD) -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a $(LD) -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a
../zlib/configure.log: ../zlib/configure.log:
(cd ../zlib; env CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ./configure --uname=CYGWIN) echo "all:" >> ../zlib/Makefile
echo '\t$$(MAKE) -f win32/Makefile.gcc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" RC="$(WINDRES)"' >> ../zlib/Makefile
touch ../zlib/configure.log

10
configure vendored
View File

@ -42,7 +42,12 @@ disablecurses=no
: ${CC:="gcc"} : ${CC:="gcc"}
: ${CPPFLAGS:=""} : ${CPPFLAGS:=""}
: ${CFLAGS:=""} : ${CFLAGS:=""}
: ${LD:="ld"}
: ${LDFLAGS:=""} : ${LDFLAGS:=""}
: ${AR:="ar"}
: ${ARFLAGS:="ruv"}
: ${RANLIB:="ranlib"}
: ${WINDRES:="windres"}
# On WSL, set OS to "Windows_NT" to create a Windows # On WSL, set OS to "Windows_NT" to create a Windows
# build instead of a Linux (on Windows) build: # build instead of a Linux (on Windows) build:
@ -232,6 +237,9 @@ while [ $# != 0 ] ; do
RANLIB=*) RANLIB=*)
RANLIB=`echo $1 | sed -e 's/^RANLIB=//'` RANLIB=`echo $1 | sed -e 's/^RANLIB=//'`
;; ;;
WINDRES=*)
WINDRES=`echo $1 | sed -e 's/^WINDRES=//'`
;;
*) *)
echo "option '$1' unrecognized or missing an argument; try $0 --help" echo "option '$1' unrecognized or missing an argument; try $0 --help"
exit 1 exit 1
@ -315,6 +323,7 @@ if [ "$help" = "yes" ]; then
echo " AR=<archiver> archiver" echo " AR=<archiver> archiver"
echo " ARFLAGS=<archiver flgs> archiver flags" echo " ARFLAGS=<archiver flgs> archiver flags"
echo " RANLIB=<archive indexer> archive indexer" echo " RANLIB=<archive indexer> archive indexer"
echo " WINDRES=<resource compiler> resource compiler"
echo "" echo ""
echo "Available machine types: $machs" echo "Available machine types: $machs"
echo "" echo ""
@ -426,4 +435,5 @@ LIBNCURSES=$LIBNCURSES
AR=$AR AR=$AR
ARFLAGS=$ARFLAGS ARFLAGS=$ARFLAGS
RANLIB=$RANLIB RANLIB=$RANLIB
WINDRES=$WINDRES
END END