diff options
author | Jack Humbert <jack.humb@gmail.com> | 2015-10-27 14:52:18 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2015-10-27 14:52:18 -0400 |
commit | d311fd8d1a0af3b767d26b520d399bf0db22f058 (patch) | |
tree | b9de5704143ac205b4e26222f9d7551e9b161924 /tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test | |
parent | a766918d5c48204375f4c207b30bbbf1389df14f (diff) | |
parent | 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b (diff) |
Merge pull request #34 from jackhumbert/tmk-master
merging from tmk, new_project script and template
Diffstat (limited to 'tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test')
-rw-r--r-- | tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test b/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test new file mode 100644 index 0000000000..1307d5e370 --- /dev/null +++ b/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test @@ -0,0 +1,88 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2014. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# +# -------------------------------------- +# LUFA Project Makefile. +# -------------------------------------- + +# 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 +else ifeq ($(ARCH), XMEGA) + F_USB = 48000000 +else ifeq ($(ARCH), UC3) + F_USB = 48000000 +endif + +# 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 +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 redundant 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 += -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 += -Wcast-qual +#CC_FLAGS += -Wconversion +#CC_FLAGS += -Wsign-conversion +#CC_FLAGS += -pedantic + +# Include LUFA build script makefiles +include $(LUFA_PATH)/Build/lufa_sources.mk +include $(LUFA_PATH)/Build/lufa_build.mk |