From b458f162f6a51076ff811bad1db70625f63e9a83 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 8 Jun 2011 17:29:12 +0300 Subject: [PATCH] kvm tools: Add WERROR to Makefile for disabling -Werror This patch adds a WERROR variable to Makefile that can be used as follows: make WERROR=0 to disable '-Werror' while building. This is useful while doing 'git bisect', for example. Suggested-by: Ingo Molnar Cc: Cyrill Gorcunov Signed-off-by: Pekka Enberg --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 84aea8c..97dce86 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +# +# Define WERROR=0 to disable -Werror. +# + ifeq ($(strip $(V)),) E = @echo Q = @ @@ -111,7 +115,10 @@ DEFINES += -D_GNU_SOURCE KVM_INCLUDE := include CFLAGS += $(CPPFLAGS) $(DEFINES) -I$(KVM_INCLUDE) -I../../include -I../../arch/$(ARCH)/include/ -Os -g -WARNINGS += -Werror +ifneq ($(WERROR),0) + WARNINGS += -Werror +endif + WARNINGS += -Wall WARNINGS += -Wcast-align WARNINGS += -Wformat=2