diff --git a/makefile b/makefile index f17e7bbb..9e068183 100644 --- a/makefile +++ b/makefile @@ -36,7 +36,10 @@ single-c: # compiler setup CC = clang -ifneq ($(findstring gcc, $(CC)),) + +# Detects if we are running GCC instead of Clang +CC_IS_GCC = $(shell $(CC) --version | head -n1 | grep -m 1 -c "gcc") +ifeq (${CC_IS_GCC}, 1) CCFLAGS = -Wno-parentheses else CCFLAGS = -Wno-microsoft-anon-tag @@ -121,4 +124,4 @@ ${bd}/load.o: src/gen/customRuntime clean: rm -f ${bd}/*.o - rm -f ${bd}/*.d \ No newline at end of file + rm -f ${bd}/*.d