From 924c0eb6ac80186297769e5d41065831b2903573 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 2 Jun 2012 11:18:28 +0000 Subject: Add C_FLAGS, CPP_FLAGS and ASM_FLAGS variables to the build system BUILD module to allow for language-specific compiler/assembler flags. --- BuildTests/ModuleTest/makefile.test | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'BuildTests/ModuleTest') diff --git a/BuildTests/ModuleTest/makefile.test b/BuildTests/ModuleTest/makefile.test index 94004b8b3..b3307f897 100644 --- a/BuildTests/ModuleTest/makefile.test +++ b/BuildTests/ModuleTest/makefile.test @@ -27,8 +27,9 @@ TARGET = Test SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB) LUFA_PATH = ../../LUFA/ -CC_FLAGS = -Wextra -#CC_FLAGS += -Werror # FIXME +# Generic C/C++ compiler flags +CC_FLAGS = -Wextra +CC_FLAGS += -Werror CC_FLAGS += -Wformat=2 CC_FLAGS += -Winit-self CC_FLAGS += -Wswitch-enum @@ -38,11 +39,9 @@ CC_FLAGS += -Wpointer-arith CC_FLAGS += -Wcast-align CC_FLAGS += -Wwrite-strings CC_FLAGS += -Wlogical-op -CC_FLAGS += -Wmissing-parameter-type CC_FLAGS += -Wmissing-declarations CC_FLAGS += -Wmissing-field-initializers CC_FLAGS += -Wmissing-format-attribute -CC_FLAGS += -Wnested-externs CC_FLAGS += -Woverlength-strings # Only enable rendundant declaration warnings for AVR8 target (FIXME) @@ -50,6 +49,10 @@ ifeq ($(ARCH), AVR8) CC_FLAGS += -Wredundant-decls endif +# C compiler only flags +C_FLAGS += -Wmissing-parameter-type +C_FLAGS += -Wnested-externs + # Potential additional warnings to enable in the future (FIXME) #CC_FLAGS += -Wswitch-default #CC_FLAGS += -Wc++-compat -- cgit v1.2.3