From ddad913e06fb51e80957177d404fef3d1d3b5d6c Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 24 Apr 2020 21:59:51 +0300 Subject: [PATCH] OK this time it will work. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e30b3f6..33b8990 100644 --- a/Makefile +++ b/Makefile @@ -87,11 +87,15 @@ ifeq ($(PLATFORM),Darwin) OPEN_DIALOG = OpenDialog/cocoa.m endif -# This must come first because GCC is special -CFLAGS += -Werror=partial-availability # These must come before the -Wno- flags CFLAGS += -Werror -Wall -Wno-unknown-warning -Wno-unknown-warning-option CFLAGS += -Wno-nonnull -Wno-unused-result -Wno-strict-aliasing -Wno-multichar -Wno-int-in-bool-context + +# Only add this flag if the compiler supports it +ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Wpartial-availability 2> $(NULL); echo $$?),0) +CFLAGS += -Wpartial-availability +endif + CFLAGS += -std=gnu11 -D_GNU_SOURCE -DVERSION="$(VERSION)" -I. -D_USE_MATH_DEFINES ifeq (,$(PKG_CONFIG))