Makefile: fix order of cc-option and CFLAGS definitions

This commit is contained in:
Eric Biggers 2016-05-26 23:09:39 -05:00
parent e8003ecd71
commit 021e692a7b

View File

@ -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.