diff --git a/Makefile b/Makefile index 2e54c9b..969dfe7 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,9 @@ endif #### Flags given here are not intended to be overridden, but you can add more #### by defining CFLAGS in the environment or on the 'make' command line. +cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null \ + 1>&2 2>/dev/null; then echo $(1); fi) + override CFLAGS := \ $(CFLAGS) -O2 -fomit-frame-pointer -std=c99 -I. -Icommon \ -Wall -Wundef \ @@ -48,9 +51,6 @@ override CFLAGS := \ $(call cc-option,-Wstrict-prototypes) \ $(call cc-option,-Wvla) -cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null \ - 1>&2 2>/dev/null; then echo $(1); fi) - ############################################################################## #### Quiet make is enabled by default. Define V=1 to disable.