From 021e692a7b7f6eebfb4c7de87402375f6ee29654 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 26 May 2016 23:09:39 -0500 Subject: [PATCH] Makefile: fix order of cc-option and CFLAGS definitions --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.