makefile: make -lpq conditional based on POSTGRES env var

This commit is contained in:
Marko Burčul 2026-02-09 18:53:29 +01:00
parent 00525a3880
commit c7dbec2621
No known key found for this signature in database
GPG Key ID: FC4CD2F9A040D54A

View File

@ -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