1 LUFA_DIR = protocol/lufa
3 # Path to the LUFA library
4 LUFA_PATH ?= $(LUFA_DIR)/LUFA-git
7 # Create the LUFA source path variables by including the LUFA makefile
8 ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
9 # New build system from 20120730
10 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
11 include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk
13 include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile
20 ifeq ($(strip $(MIDI_ENABLE)), yes)
21 LUFA_SRC += midi/midi.c \
23 midi/bytequeue/bytequeue.c \
24 midi/bytequeue/interrupt_setting.c \
28 ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
29 LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
30 $(TMK_DIR)/protocol/serial_uart.c
36 VPATH += $(TMK_PATH)/$(LUFA_DIR)
37 VPATH += $(TMK_PATH)/$(LUFA_PATH)
40 #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
43 #ifdef EXTRAKEY_ENABLE
46 # LUFA library compile-time options and predefined tokens
47 LUFA_OPTS = -DUSB_DEVICE_ONLY
48 LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS
49 LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
50 #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
51 LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
52 LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
54 OPT_DEFS += -DF_USB=$(F_USB)UL
55 OPT_DEFS += -DARCH=ARCH_$(ARCH)
56 OPT_DEFS += $(LUFA_OPTS)
58 # This indicates using LUFA stack
59 OPT_DEFS += -DPROTOCOL_LUFA