Set -Werror only if WERROR is set

This commit is contained in:
Atis Elsts 2018-09-03 12:01:34 +01:00
parent b49477441c
commit c8792c9261
1 changed files with 4 additions and 1 deletions

View File

@ -9,10 +9,13 @@ SIZE = arm-none-eabi-size
SREC_CAT = srec_cat
CFLAGS += -mthumb -mabi=aapcs -mlittle-endian
CFLAGS += -Werror -Wall
CFLAGS += -Wall
CFLAGS += -std=c99
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
CFLAGS += -fshort-enums -fomit-frame-pointer -fno-builtin
ifeq ($(WERROR),1)
CFLAGS += -Werror
endif
LDFLAGS += -mthumb -mlittle-endian