diff options
author | Tim Deegan <Tim.Deegan@citrix.com> | 2011-03-08 10:23:52 +0000 |
---|---|---|
committer | Tim Deegan <Tim.Deegan@citrix.com> | 2011-03-08 10:23:52 +0000 |
commit | 87c604dae49a97875c69069fb2ad5d15a5bade7e (patch) | |
tree | f4ef9ba3e38a3529a4873fc1ac4903989f2ba04a /Config.mk | |
parent | 07d9f1dd0d623acc309c8c1f1731e62d141b029b (diff) | |
download | xen-87c604dae49a97875c69069fb2ad5d15a5bade7e.tar.gz xen-87c604dae49a97875c69069fb2ad5d15a5bade7e.tar.bz2 xen-87c604dae49a97875c69069fb2ad5d15a5bade7e.zip |
Tidy makefiles to use CFLAGS-$(foo) idiom instead of ifeq.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'Config.mk')
-rw-r--r-- | Config.mk | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -23,6 +23,15 @@ DESTDIR ?= / # Allow phony attribute to be listed as dependency rather than fake target .PHONY: .phony +# Use Clang/LLVM instead of GCC? +clang ?= n +ifeq ($(clang),n) +gcc := y +else +gcc := n +endif + + include $(XEN_ROOT)/config/$(XEN_OS).mk include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk @@ -148,12 +157,9 @@ CFLAGS += -Wall -Wstrict-prototypes # result of any casted expression causes a warning. CFLAGS += -Wno-unused-value -ifeq ($(clang),y) # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...' -CFLAGS += -Wno-parentheses -# And is over-zealous with the printf format lint -CFLAGS += -Wno-format -endif +# and is over-zealous with the printf format lint +CFLAGS-$(clang) += -Wno-parentheses -Wno-format $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) |