Replace architecture specific makefiles in the BuildTests with the new common build...
[pub/lufa.git] / BuildTests / ModuleTest / makefile.test
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2012.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.lufa-lib.org
7 #
8 # --------------------------------------
9 # LUFA Project Makefile.
10 # --------------------------------------
11
12 MCU = at90usb1287
13 ARCH = AVR8
14 BOARD = NONE
15 F_CPU = 8000000
16
17 ifeq ($(ARCH), AVR8)
18 F_USB = 8000000
19 else ifeq ($(ARCH), XMEGA)
20 F_USB = 48000000
21 else ifeq ($(ARCH), UC3)
22 F_USB = 48000000
23 endif
24
25 OPTIMIZATION = 1
26 TARGET = Test
27 SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB)
28 LUFA_PATH = ../../LUFA/
29
30 CC_FLAGS = -Wextra
31 #CC_FLAGS += -Werror # FIXME
32 CC_FLAGS += -Wformat=2
33 CC_FLAGS += -Winit-self
34 CC_FLAGS += -Wswitch-enum
35 CC_FLAGS += -Wunused
36 CC_FLAGS += -Wundef
37 CC_FLAGS += -Wpointer-arith
38 CC_FLAGS += -Wcast-align
39 CC_FLAGS += -Wwrite-strings
40 CC_FLAGS += -Wlogical-op
41 CC_FLAGS += -Wmissing-parameter-type
42 CC_FLAGS += -Wmissing-declarations
43 CC_FLAGS += -Wmissing-field-initializers
44 CC_FLAGS += -Wmissing-format-attribute
45 CC_FLAGS += -Wnested-externs
46 CC_FLAGS += -Woverlength-strings
47
48 # Only enable rendundant declaration warnings for AVR8 target (FIXME)
49 ifeq ($(ARCH), AVR8)
50 CC_FLAGS += -Wredundant-decls
51 endif
52
53 # Potential additional warnings to enable in the future (FIXME)
54 #CC_FLAGS += -Wswitch-default
55 #CC_FLAGS += -Wc++-compat
56 #CC_FLAGS += -Wcast-qual
57 #CC_FLAGS += -Wconversion
58 #CC_FLAGS += -Wjump-misses-init
59 #CC_FLAGS += -pedantic
60
61 # Include LUFA build script makefiles
62 include $(LUFA_PATH)/Build/lufa.sources.in
63 include $(LUFA_PATH)/Build/lufa.build.in