3 # Copyright (C) Dean Camera, 2012.
5 # dean [at] fourwalledcubicle [dot] com
8 # --------------------------------------
9 # LUFA Project Makefile.
10 # --------------------------------------
18 SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB)
19 LUFA_PATH = ../../LUFA/
23 else ifeq ($(ARCH), XMEGA)
25 else ifeq ($(ARCH), UC3)
29 # Generic C/C++ compiler flags
32 CC_FLAGS += -Wformat=2
33 CC_FLAGS += -Winit-self
34 CC_FLAGS += -Wswitch-enum
37 CC_FLAGS += -Wpointer-arith
38 CC_FLAGS += -Wcast-align
39 CC_FLAGS += -Wwrite-strings
40 CC_FLAGS += -Wlogical-op
41 CC_FLAGS += -Wmissing-declarations
42 CC_FLAGS += -Wmissing-field-initializers
43 CC_FLAGS += -Wmissing-format-attribute
44 CC_FLAGS += -Woverlength-strings
46 # Only enable rendundant declaration warnings for AVR8 target (FIXME)
48 CC_FLAGS += -Wredundant-decls
51 # C compiler only flags
52 C_FLAGS += -Wmissing-parameter-type
53 C_FLAGS += -Wnested-externs
55 # Potential additional warnings to enable in the future (FIXME)
56 #CC_FLAGS += -Wswitch-default
57 #CC_FLAGS += -Wc++-compat
58 #CC_FLAGS += -Wcast-qual
59 #CC_FLAGS += -Wconversion
60 #CC_FLAGS += -Wjump-misses-init
61 #CC_FLAGS += -pedantic
63 # Include LUFA build script makefiles
64 include $(LUFA_PATH)/Build/lufa.sources.in
65 include $(LUFA_PATH)/Build/lufa.build.in