]> git.gir.st - tmk_keyboard.git/blob - protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test
Squashed 'tmk_core/' changes from caca2c0..dc0e46e
[tmk_keyboard.git] / protocol / lufa / LUFA-git / BuildTests / ModuleTest / makefile.test
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2014.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.lufa-lib.org
7 #
8 # --------------------------------------
9 # LUFA Project Makefile.
10 # --------------------------------------
11
12 # Run "make help" for target help.
13
14 MCU =
15 ARCH =
16 BOARD = NONE
17 F_CPU = $(F_USB)
18 OPTIMIZATION = 1
19 TARGET = Test
20 SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB)
21 LUFA_PATH = ../../LUFA
22 DEBUG_LEVEL = 0
23
24 ifeq ($(ARCH), AVR8)
25 F_USB = 8000000
26 else ifeq ($(ARCH), XMEGA)
27 F_USB = 48000000
28 else ifeq ($(ARCH), UC3)
29 F_USB = 48000000
30 endif
31
32 # Generic C/C++ compiler flags
33 CC_FLAGS = -Wextra
34 CC_FLAGS += -Werror
35 CC_FLAGS += -Wformat=2
36 CC_FLAGS += -Winit-self
37 CC_FLAGS += -Wswitch-enum
38 CC_FLAGS += -Wunused
39 CC_FLAGS += -Wundef
40 CC_FLAGS += -Wpointer-arith
41 CC_FLAGS += -Wcast-align
42 CC_FLAGS += -Wwrite-strings
43 CC_FLAGS += -Wlogical-op
44 CC_FLAGS += -Wmissing-declarations
45 CC_FLAGS += -Wmissing-field-initializers
46 CC_FLAGS += -Wmissing-format-attribute
47 CC_FLAGS += -Woverlength-strings
48 CC_FLAGS += -Wswitch-default
49 CC_FLAGS += -Wfloat-equal
50 CC_FLAGS += -Waggregate-return
51 CC_FLAGS += -Wmissing-include-dirs
52
53 # Disable warnings not supported by the version of GCC used for UC3 targets (FIXME)
54 ifneq ($(ARCH), UC3)
55 CC_FLAGS += -Wdouble-promotion
56 endif
57
58 # Only enable redundant declaration warnings for AVR8 target (FIXME)
59 ifeq ($(ARCH), AVR8)
60 CC_FLAGS += -Wredundant-decls
61 endif
62
63 # C compiler only flags
64 C_FLAGS += -Wmissing-parameter-type
65 C_FLAGS += -Wmissing-prototypes
66 C_FLAGS += -Wnested-externs
67 C_FLAGS += -Wbad-function-cast
68 C_FLAGS += -Wstrict-prototypes
69 C_FLAGS += -Wold-style-definition
70
71 # Disable warnings not supported by the version of GCC used for UC3 targets (FIXME)
72 ifneq ($(ARCH), UC3)
73 C_FLAGS += -Wunsuffixed-float-constants
74 C_FLAGS += -Wjump-misses-init
75 endif
76
77 # Only check C++ compatibility on the build files, to ensure headers are C++ compatible
78 Test_C.c Test_CPP.c: CC_FLAGS += -Wc++-compat
79
80 # Potential additional warnings to enable in the future (FIXME)
81 #CC_FLAGS += -Wcast-qual
82 #CC_FLAGS += -Wconversion
83 #CC_FLAGS += -Wsign-conversion
84 #CC_FLAGS += -pedantic
85
86 # Include LUFA build script makefiles
87 include $(LUFA_PATH)/Build/lufa_sources.mk
88 include $(LUFA_PATH)/Build/lufa_build.mk
Imprint / Impressum