From: Viktor Szakats Date: Sat, 22 Aug 2020 21:06:06 +0000 (+0000) Subject: Makefile.m32: add ability to override zstd libs [ci skip] X-Git-Tag: curl-7_73_0~232 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38039da764f9302f3188432895184eeae9ca8eaa;p=thirdparty%2Fcurl.git Makefile.m32: add ability to override zstd libs [ci skip] Similarly to brotli, where this was already possible. E.g. it allows to link zstd statically to libcurl.dll. Ref: https://github.com/curl/curl-for-win/issues/12 Ref: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89 Closes https://github.com/curl/curl/pull/5840 --- diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32 index e8c0d376f7..a2dca6bbc0 100644 --- a/docs/examples/Makefile.m32 +++ b/docs/examples/Makefile.m32 @@ -294,7 +294,12 @@ endif ifdef ZSTD INCLUDES += -I"$(ZSTD_PATH)/include" CFLAGS += -DHAVE_ZSTD - curl_LDADD += -L"$(ZSTD_PATH)/lib" -lzstd + curl_LDADD += -L"$(ZSTD_PATH)/lib" + ifdef ZSTD_LIBS + curl_LDADD += $(ZSTD_LIBS) + else + curl_LDADD += -lzstd + endif endif ifdef BROTLI INCLUDES += -I"$(BROTLI_PATH)/include" diff --git a/lib/Makefile.m32 b/lib/Makefile.m32 index 02b31106c6..37887eed5d 100644 --- a/lib/Makefile.m32 +++ b/lib/Makefile.m32 @@ -298,7 +298,12 @@ endif ifdef ZSTD INCLUDES += -I"$(ZSTD_PATH)/include" CFLAGS += -DHAVE_ZSTD - DLL_LIBS += -L"$(ZSTD_PATH)/lib" -lzstd + DLL_LIBS += -L"$(ZSTD_PATH)/lib" + ifdef ZSTD_LIBS + DLL_LIBS += $(ZSTD_LIBS) + else + DLL_LIBS += -lzstd + endif endif ifdef BROTLI INCLUDES += -I"$(BROTLI_PATH)/include" diff --git a/src/Makefile.m32 b/src/Makefile.m32 index afb4fd547b..74e7b93d7a 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -312,7 +312,12 @@ endif ifdef ZSTD INCLUDES += -I"$(ZSTD_PATH)/include" CFLAGS += -DHAVE_ZSTD - curl_LDADD += -L"$(ZSTD_PATH)/lib" -lzstd + curl_LDADD += -L"$(ZSTD_PATH)/lib" + ifdef ZSTD_LIBS + curl_LDADD += $(ZSTD_LIBS) + else + curl_LDADD += -lzstd + endif endif ifdef BROTLI INCLUDES += -I"$(BROTLI_PATH)/include"