1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

makefiles: make -Werror flags dependent of WERROR

This commit is contained in:
Loïc Dauphin 2017-06-08 14:21:00 +02:00
parent 786baac055
commit 220ed6558e

View File

@ -30,8 +30,11 @@ endif
# Worse yet they hide errors by accepting wildcard argument types.
ifeq ($(shell $(CC) -Wstrict-prototypes -Werror=strict-prototypes -Wold-style-definition -Werror=old-style-definition -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
# duplicated parameters don't hurt
CFLAGS += -Wstrict-prototypes -Werror=strict-prototypes -Wold-style-definition -Werror=old-style-definition
CFLAGS += -Wstrict-prototypes -Wold-style-definition
CXXUWFLAGS += -Wstrict-prototypes -Wold-style-definition
ifeq ($(WERROR),1)
CFLAGS += -Werror=strict-prototypes -Werror=old-style-definition
endif
endif
# Unwanted flags for c++