From c7dbec2621dfde43f004eed72d1a8d368cfe67ca Mon Sep 17 00:00:00 2001 From: markoburcul Date: Mon, 9 Feb 2026 18:53:29 +0100 Subject: [PATCH] makefile: make -lpq conditional based on POSTGRES env var --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b258861d..b60478376 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,12 @@ ifeq ($(detected_OS),Windows) NIM_PARAMS += --passL:"-Lvendor/nim-nat-traversal/vendor/miniupnp/miniupnpc" NIM_PARAMS += --passL:"-Lvendor/nim-nat-traversal/vendor/libnatpmp-upstream" - LIBS = -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp -lpq + LIBS = -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp + + ifeq ($(POSTGRES), 1) + LIBS += -lpq + endif + NIM_PARAMS += $(foreach lib,$(LIBS),--passL:"$(lib)") # Allow multiple definitions when linking Rust static library with GCC