Makefile: add a possibility to disable -Werror
authorYann Gautier <yann.gautier@st.com>
Mon, 10 Dec 2018 17:08:53 +0000 (18:08 +0100)
committerYann Gautier <yann.gautier@st.com>
Mon, 10 Dec 2018 17:09:49 +0000 (18:09 +0100)
Setting E=0 in the make command line disables -Werror in CPPFLAGS.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Makefile

index 5841345eb0205d939948b710e88fa3eea61c1205..6f14825c756f955ab5bd263897fb476a373bf4aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -226,8 +226,12 @@ else ifeq (${W},3)
 WARNINGS := $(WARNING1) $(WARNING2) $(WARNING3)
 endif
 
+ifneq (${E},0)
+ERRORS := -Werror
+endif
+
 CPPFLAGS               =       ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc         \
-                               -Wmissing-include-dirs -Werror $(WARNINGS)
+                               -Wmissing-include-dirs $(ERRORS) $(WARNINGS)
 ASFLAGS                        +=      $(CPPFLAGS) $(ASFLAGS_$(ARCH))                  \
                                -D__ASSEMBLY__ -ffreestanding                   \
                                -Wa,--fatal-warnings