From 099bd97f0a9f524db0aca51a645de58803062518 Mon Sep 17 00:00:00 2001 From: Petr Ledvina Date: Tue, 16 May 2017 15:28:07 +0200 Subject: [PATCH] Optional -static SITL Use OPTION=SITL_STATIC if static SITL build is necessary --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1da6d412d2..06132c2f8b 100644 --- a/Makefile +++ b/Makefile @@ -1201,12 +1201,16 @@ LDFLAGS = \ $(ARCH_FLAGS) \ $(LTO_FLAGS) \ $(DEBUG_FLAGS) \ - -static \ - -static-libgcc \ -Wl,-gc-sections,-Map,$(TARGET_MAP) \ -Wl,-L$(LINKER_DIR) \ -Wl,--cref \ -T$(LD_SCRIPT) + +ifneq ($(filter SITL_STATIC,$(OPTIONS)),) +LDFLAGS += \ + -static \ + -static-libgcc +endif endif ###############################################################################