From c4c70e8533f909d698affcf4e8e8e0592ad24905 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Mar 2019 20:25:34 -0600 Subject: [PATCH] adapt MinGW cross-build suport for LZ4 original commit: 959d2b03cf8a6261583d060cf1d37fbf3e233f82 --- c/Mf-ta6nt | 9 ++++++--- c/Mf-ti3nt | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/c/Mf-ta6nt b/c/Mf-ta6nt index 615051f7db..5a615d70d0 100644 --- a/c/Mf-ta6nt +++ b/c/Mf-ta6nt @@ -45,12 +45,15 @@ ${Scheme}${cross:t=}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} -lshell32 -luser32 -lole32 -lrpcrt4 -luuid .c.$o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c -${Kernel}: ${kernelobj} ../zlib/libz.a - $(LD) -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + $(LD) -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ../zlib/configure.log: 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 + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3nt b/c/Mf-ti3nt index 356b89153c..6827a08f7d 100644 --- a/c/Mf-ti3nt +++ b/c/Mf-ti3nt @@ -45,12 +45,15 @@ ${Scheme}${cross:t=}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} -lshell32 -luser32 -lole32 -lrpcrt4 -luuid .c.$o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c -${Kernel}: ${kernelobj} ../zlib/libz.a - $(LD) -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + $(LD) -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ../zlib/configure.log: 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 + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ${MAKE} liblz4.a)