summaryrefslogtreecommitdiffstats
path: root/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-05-13 04:13:10 +0200
committertmk <hasu@tmk-kbd.com>2015-05-13 04:13:10 +0200
commitf6d56675f9f981c5464f0ca7a1fbb0162154e8c5 (patch)
tree57c9d4b3808a26116ae0ee7956fc00b84841aa2b /protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test
parent4d116a04e94cf0d19317d5b44e4fa9f34a3e5594 (diff)
downloadqmk_firmware-f6d56675f9f981c5464f0ca7a1fbb0162154e8c5.tar.gz
qmk_firmware-f6d56675f9f981c5464f0ca7a1fbb0162154e8c5.tar.xz
Squashed 'tmk_core/' changes from caca2c0..dc0e46e
dc0e46e Rename LUFA to LUFA-git 3bfa7fa Remove LUFA-120730 215b764 Merge commit 'afa0f22a9299686fd88f58ce09c5b521ac917e8f' as 'protocol/lufa/LUFA' afa0f22 Squashed 'protocol/lufa/LUFA/' content from commit def7fca c0c42fa Remove submodule of LUFA 30f897d Merge commit '87ced33feb74e79c3281dda36eb6d6d153399b41' as 'protocol/usb_hid/USB_Host_Shield_2.0' 87ced33 Squashed 'protocol/usb_hid/USB_Host_Shield_2.0/' content from commit aab4a69 14f6d49 Remove submodule of USB_Host_Shield_2.0 git-subtree-dir: tmk_core git-subtree-split: dc0e46eaa4367d4e218f8816e3c117895820f07c
Diffstat (limited to 'protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test')
-rw-r--r--protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test88
1 files changed, 88 insertions, 0 deletions
diff --git a/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test b/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test
new file mode 100644
index 000000000..1307d5e37
--- /dev/null
+++ b/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