From fe5a2eea0575852b341464f31098d7f8f410dbe9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 11 Mar 2020 11:04:38 +0000 Subject: [PATCH] Make LDFLAGS overrideable Based on . Signed-off-by: Simon McVittie --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 337f417..77ea33c 100755 --- a/Makefile +++ b/Makefile @@ -92,13 +92,16 @@ endif # ---------- -# Base LDFLAGS. +# Base LDFLAGS, none by default. +LDFLAGS ?= + +# Required LDFLAGS to build a game module. ifeq ($(OSTYPE), Darwin) -LDFLAGS := -shared -arch x86_64 +LDFLAGS += -shared -arch x86_64 else ifeq ($(OSTYPE), Windows) -LDFLAGS := -shared -static-libgcc +LDFLAGS += -shared -static-libgcc else -LDFLAGS := -shared -lm +LDFLAGS += -shared -lm endif # ----------