X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1faa5ba70aecc5a55ec198e2129181f5a79489d2..3642ea0b9715cdf0196b10c9fc97898940eaefa6:/BuildTests/ModuleTest/makefile.test?ds=sidebyside diff --git a/BuildTests/ModuleTest/makefile.test b/BuildTests/ModuleTest/makefile.test index aad7e728a..6225ec093 100644 --- a/BuildTests/ModuleTest/makefile.test +++ b/BuildTests/ModuleTest/makefile.test @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2012. +# Copyright (C) Dean Camera, 2015. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -9,21 +9,24 @@ # LUFA Project Makefile. # -------------------------------------- -MCU = -ARCH = +# Run "make help" for target help. + +MCU = +ARCH = BOARD = NONE F_CPU = $(F_USB) OPTIMIZATION = 1 TARGET = Test SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB) LUFA_PATH = ../../LUFA +DEBUG_LEVEL = 0 ifeq ($(ARCH), AVR8) -F_USB = 8000000 + F_USB = 8000000 else ifeq ($(ARCH), XMEGA) -F_USB = 48000000 + F_USB = 48000000 else ifeq ($(ARCH), UC3) -F_USB = 48000000 + F_USB = 48000000 endif # Generic C/C++ compiler flags @@ -42,24 +45,44 @@ CC_FLAGS += -Wmissing-declarations CC_FLAGS += -Wmissing-field-initializers CC_FLAGS += -Wmissing-format-attribute CC_FLAGS += -Woverlength-strings +CC_FLAGS += -Wswitch-default +CC_FLAGS += -Wfloat-equal +CC_FLAGS += -Waggregate-return +CC_FLAGS += -Wmissing-include-dirs + +# Disable warnings not supported by the version of GCC used for UC3 targets (FIXME) +ifneq ($(ARCH), UC3) + CC_FLAGS += -Wdouble-promotion +endif -# Only enable rendundant declaration warnings for AVR8 target (FIXME) +# Only enable redundant declaration warnings for AVR8 target (FIXME) ifeq ($(ARCH), AVR8) -CC_FLAGS += -Wredundant-decls + CC_FLAGS += -Wredundant-decls endif # C compiler only flags C_FLAGS += -Wmissing-parameter-type +C_FLAGS += -Wmissing-prototypes C_FLAGS += -Wnested-externs +C_FLAGS += -Wbad-function-cast +C_FLAGS += -Wstrict-prototypes +C_FLAGS += -Wold-style-definition + +# Disable warnings not supported by the version of GCC used for UC3 targets (FIXME) +ifneq ($(ARCH), UC3) + C_FLAGS += -Wunsuffixed-float-constants + C_FLAGS += -Wjump-misses-init +endif + +# Only check C++ compatibility on the build files, to ensure headers are C++ compatible +Test_C.c Test_CPP.c: CC_FLAGS += -Wc++-compat # Potential additional warnings to enable in the future (FIXME) -#CC_FLAGS += -Wswitch-default -#CC_FLAGS += -Wc++-compat #CC_FLAGS += -Wcast-qual #CC_FLAGS += -Wconversion -#CC_FLAGS += -Wjump-misses-init +#CC_FLAGS += -Wsign-conversion #CC_FLAGS += -pedantic # Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa.sources.in -include $(LUFA_PATH)/Build/lufa.build.in \ No newline at end of file +include $(LUFA_PATH)/Build/lufa_sources.mk +include $(LUFA_PATH)/Build/lufa_build.mk