windows makefile: fix liblz4.dll linking

Link "liblz4.dll" with the right LZ4 library for /MT mode. It looks
like VS 2017 links anyway, but VS 2015 (and probably earlier) does not
link with the wrong library.

In a normal build, "liblz4.dll" is not needed, but it's linked in case
it turns out to be useful to compress or decompress boot files. A
normal build will construct boot files with the intended final
compression, at least when all the right flags are passed around to
the right places.
This commit is contained in:
Matthew Flatt 2021-04-29 09:56:04 -06:00
parent a1452ab399
commit ed115af6b2

View File

@ -10,7 +10,7 @@ LIBS = $(RKTIO_LIB) \
$(SCHEME_LIB_FULL) \
$(WIN32_LIBS)
LZ4_DLL = ..\liblz4.dll
LZ4_DLL = ..\liblz4mt.dll
LZ4_LIB = $(SCHEME_DIR)\$(MACHINE)\lz4\lib\liblz4.lib
DEST_DLL = ..\..\build\raw_libracketcs.dll
@ -52,7 +52,7 @@ gracket.res: ../gracket/gracket.rc ../gracket/gracket.ico
# Useful for adjusting boot file compression:
$(LZ4_DLL): lz4.c lz4.def
$(LZ4_DLL): lz4.c lz4.def $(LZ4_LIB)
cl /LD /DLL /Fe$(LZ4_DLL) $(FLAGS) lz4.c $(LZ4_LIB) $(WIN32_LIBS) /link /DEF:lz4.def
# Useful for debugging: