3 # Copyright (C) Dean Camera, 2012.
5 # dean [at] fourwalledcubicle [dot] com
8 # --------------------------------------
9 # LUFA Project Makefile.
10 # --------------------------------------
12 # Run "make help" for target help.
20 SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB)
21 LUFA_PATH = ../../LUFA
26 else ifeq ($(ARCH), XMEGA)
28 else ifeq ($(ARCH), UC3)
32 # Generic C/C++ compiler flags
35 CC_FLAGS += -Wformat=2
36 CC_FLAGS += -Winit-self
37 CC_FLAGS += -Wswitch-enum
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
50 # Only enable rendundant declaration warnings for AVR8 target (FIXME)
52 CC_FLAGS += -Wredundant-decls
55 # C compiler only flags
56 C_FLAGS += -Wmissing-parameter-type
57 C_FLAGS += -Wnested-externs
59 # Potential additional warnings to enable in the future (FIXME)
60 #CC_FLAGS += -Wc++-compat
61 #CC_FLAGS += -Wcast-qual
62 #CC_FLAGS += -Wconversion
63 #CC_FLAGS += -Wjump-misses-init
64 #CC_FLAGS += -pedantic
66 # Include LUFA build script makefiles
67 include $(LUFA_PATH)/Build/lufa_sources.mk
68 include $(LUFA_PATH)/Build/lufa_build.mk