makefile.test 1.58 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
#             LUFA Library
#     Copyright (C) Dean Camera, 2012.
#
#  dean [at] fourwalledcubicle [dot] com
#           www.lufa-lib.org
#
# --------------------------------------
#         LUFA Project Makefile.
# --------------------------------------

MCU          = 
ARCH         = 
BOARD        = NONE
F_CPU        = $(F_USB)
16
DEBUG_LEVEL  = 0
17
18

ifeq ($(ARCH), AVR8)
19
   F_USB     = 8000000
20
else ifeq ($(ARCH), XMEGA)
21
   F_USB     = 48000000
22
else ifeq ($(ARCH), UC3)
23
   F_USB     = 48000000
24
25
26
27
28
endif

OPTIMIZATION = 1
TARGET       = Test
SRC          = Test.c Dummy.S $(LUFA_SRC_USB)
29
LUFA_PATH    = ../../LUFA
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

# 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
64
65

# Include LUFA build script makefiles
66
67
include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa_build.mk