From d87f9073b1e7c87a184a8cb14d35a6d057a5bf28 Mon Sep 17 00:00:00 2001 From: Dean 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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2270 d5102386-fcda-11dd-9fdb-3debd5008f28 --- BuildTests/ModuleTest/makefile.test | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'BuildTests') diff --git a/BuildTests/ModuleTest/makefile.test b/BuildTests/ModuleTest/makefile.test index 94004b8b..b3307f89 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