From 4a595c03241290ef9c1ccd2b24d061ecf6e2d54f Mon Sep 17 00:00:00 2001 From: turbocat Date: Sat, 5 Jun 2021 21:12:11 +0000 Subject: [PATCH] ZLIB: - It is now autobuild as a dynamic library(PE DLL). git-svn-id: svn://kolibrios.org@8766 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/sdk/sources/zlib/Tupfile.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/sdk/sources/zlib/Tupfile.lua b/contrib/sdk/sources/zlib/Tupfile.lua index 46301d889b..8c22a64d49 100755 --- a/contrib/sdk/sources/zlib/Tupfile.lua +++ b/contrib/sdk/sources/zlib/Tupfile.lua @@ -3,7 +3,12 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../../programs" or tup tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_newlib.lua") +LDFLAGS = " -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib ../../lib/libz.dll.a " + CFLAGS = CFLAGS .. " -DHAVE_UNISTD_H -U_Win32 -U_WIN32 -U__MINGW32__" compile_gcc{"adler32.c", "compress.c", "crc32.c", "deflate.c", "gzclose.c", "gzlib.c", "gzread.c", "gzwrite.c", "infback.c", "inffast.c", "inflate.c", "inftrees.c", "trees.c", "uncompr.c", "zutil.c"} -tup.rule(OBJS, "kos32-ar rcs %o %f", {"../../lib/libz.a", "../../lib/"}) +--tup.rule(OBJS, "kos32-ar rcs %o %f", {"../../lib/libz.a", "../../lib/"}) + +tup.rule(OBJS, "kos32-ld zlib.def" .. LDFLAGS .. "-o %o %f -lgcc -lc.dll -ldll " .. tup.getconfig("KPACK_CMD"), + {"../../bin/libz.dll", extra_outputs = {"../../lib/libz.dll.a", "../../lib/"}})