X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1faa5ba70aecc5a55ec198e2129181f5a79489d2..31022dfbe9ba7f10e9be5be85e16d2ee203d40df:/BuildTests/SingleUSBModeTest/makefile.test diff --git a/BuildTests/SingleUSBModeTest/makefile.test b/BuildTests/SingleUSBModeTest/makefile.test index 7f634821f..b5268c044 100644 --- a/BuildTests/SingleUSBModeTest/makefile.test +++ b/BuildTests/SingleUSBModeTest/makefile.test @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2012. +# Copyright (C) Dean Camera, 2013. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -9,26 +9,61 @@ # LUFA Project Makefile. # -------------------------------------- +# Run "make help" for target help. + MCU = ARCH = BOARD = NONE F_CPU = $(F_USB) +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 OPTIMIZATION = 1 TARGET = Test SRC = Test.c Dummy.S $(LUFA_SRC_USB) LUFA_PATH = ../../LUFA -CC_FLAGS = -# TODO: Add warnings and set warnings as errors + +# Generic C/C++ compiler flags +CC_FLAGS = -Wextra +CC_FLAGS += -Werror +CC_FLAGS += -Wformat=2 +CC_FLAGS += -Winit-self +CC_FLAGS += -Wswitch-enum +CC_FLAGS += -Wunused +CC_FLAGS += -Wundef +CC_FLAGS += -Wpointer-arith +CC_FLAGS += -Wcast-align +CC_FLAGS += -Wwrite-strings +CC_FLAGS += -Wlogical-op +CC_FLAGS += -Wmissing-declarations +CC_FLAGS += -Wmissing-field-initializers +CC_FLAGS += -Wmissing-format-attribute +CC_FLAGS += -Woverlength-strings + +# Only enable rendundant declaration warnings for AVR8 target (FIXME) +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 +#CC_FLAGS += -Wcast-qual +#CC_FLAGS += -Wconversion +#CC_FLAGS += -Wjump-misses-init +#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 \ No newline at end of file