]> git.gir.st - tmk_keyboard.git/blob - protocol/lufa.mk
Change LUFA build options
[tmk_keyboard.git] / protocol / lufa.mk
1 LUFA_DIR = protocol/lufa
2
3 # Path to the LUFA library
4 LUFA_PATH ?= protocol/lufa/LUFA-120730
5 #LUFA_PATH ?= protocol/lufa/LUFA-130901
6
7 # Create the LUFA source path variables by including the LUFA makefile
8 ifneq (, $(wildcard $(TOP_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
9 # New build system from 20120730
10 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
11 include $(TOP_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk
12 else
13 include $(TOP_DIR)/$(LUFA_PATH)/LUFA/makefile
14 endif
15
16 LUFA_SRC = $(LUFA_DIR)/lufa.c \
17 $(LUFA_DIR)/descriptor.c \
18 $(LUFA_SRC_USB)
19
20 SRC += $(LUFA_SRC)
21
22 # Search Path
23 VPATH += $(TOP_DIR)/$(LUFA_DIR)
24 VPATH += $(TOP_DIR)/$(LUFA_PATH)
25
26 # Option modules
27 #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
28 #endif
29
30 #ifdef EXTRAKEY_ENABLE
31 #endif
32
33 # LUFA library compile-time options and predefined tokens
34 LUFA_OPTS = -DUSB_DEVICE_ONLY
35 LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS
36 LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
37 #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
38 LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
39 LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
40
41 OPT_DEFS += -DF_USB=$(F_USB)UL
42 OPT_DEFS += -DARCH=ARCH_$(ARCH)
43 OPT_DEFS += $(LUFA_OPTS)
44
45 # This indicates using LUFA stack
46 OPT_DEFS += -DPROTOCOL_LUFA
Imprint / Impressum