Makefile: add a possibility to disable -Werror

Setting E=0 in the make command line disables -Werror in CPPFLAGS.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
Yann Gautier 2018-12-10 18:08:53 +01:00
parent 1b18c6c471
commit 6336b07ad2
1 changed files with 5 additions and 1 deletions

View File

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