From 40f8a2652b0486b944128c1b40f96ffd05ddacd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?rich=CE=9Brd?= Date: Wed, 27 Mar 2024 10:37:58 -0400 Subject: [PATCH] allow overriding CC for libimiupnpc.a and libnatpmp.a targets (#81) --- makefiles/targets.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefiles/targets.mk b/makefiles/targets.mk index 5e554e9..9de26d6 100644 --- a/makefiles/targets.mk +++ b/makefiles/targets.mk @@ -134,14 +134,14 @@ ifeq ($(OS), Windows_NT) + [ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/$@ ] || \ PATH=".;$${PATH}" "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -f Makefile.mingw CC=$(CC) $@ $(HANDLE_OUTPUT) else - + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc build/$@ $(HANDLE_OUTPUT) + + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc CC=$(CC) build/$@ $(HANDLE_OUTPUT) endif libnatpmp.a: | sanity-checks ifeq ($(OS), Windows_NT) + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream OS=mingw CC=$(CC) CFLAGS="-Wall -Wno-cpp -Os -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" $@ $(HANDLE_OUTPUT) else - + "$(MAKE)" CFLAGS="-Wall -Wno-cpp -Os -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream $@ $(HANDLE_OUTPUT) + + "$(MAKE)" CFLAGS="-Wall -Wno-cpp -Os -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream CC=$(CC) $@ $(HANDLE_OUTPUT) endif #- depends on Git submodules being initialised