From 6a85659e7d04e755347a3fddd8f572daed750653 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 22 Sep 2023 18:52:46 +0000 Subject: [PATCH] Makefile.mk: always set `CURL_STATICLIB` for lib (Windows) Also fix to export all symbols in Windows debug builds, making `-debug-dyn` builds work with `-DCURL_STATICLIB` set. Ref: https://github.com/curl/curl/pull/11914 (same for CMake) Closes #11924 --- lib/Makefile.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Makefile.mk b/lib/Makefile.mk index e1f782bac8..5071600b59 100644 --- a/lib/Makefile.mk +++ b/lib/Makefile.mk @@ -375,6 +375,9 @@ distclean vclean: clean ifdef LOCAL CPPFLAGS += -DBUILDING_LIBCURL +ifdef WIN32 +CPPFLAGS += -DCURL_STATICLIB +endif ### Sources and targets @@ -388,7 +391,9 @@ ifdef WIN32 CURL_DLL_SUFFIX ?= libcurl_dll_LIBRARY := libcurl$(CURL_DLL_SUFFIX).dll libcurl_dll_a_LIBRARY := libcurl.dll.a +ifeq ($(findstring -trackmem,$(CFG)),) CURL_LDFLAGS_LIB += $(PROOT)/libcurl.def +endif ifdef MAP libcurl_map_LIBRARY := libcurl$(CURL_DLL_SUFFIX).map CURL_LDFLAGS_LIB += -Wl,-Map,$(libcurl_map_LIBRARY)