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
21 ifeq ($(strip $(MIDI_ENABLE
)), yes
)
22 include $(TMK_PATH
)/protocol
/midi.mk
25 ifeq ($(strip $(ADAFRUIT_BLE_ENABLE
)), yes
)
26 LUFA_SRC
+= $(LUFA_DIR
)/adafruit_ble.
cpp
29 ifeq ($(strip $(BLUETOOTH_ENABLE
)), yes
)
30 LUFA_SRC
+= $(LUFA_DIR
)/bluetooth.c \
31 $(TMK_DIR
)/protocol
/serial_uart.c
34 ifeq ($(strip $(VIRTSER_ENABLE
)), yes
)
35 LUFA_SRC
+= $(LUFA_ROOT_PATH
)/Drivers
/USB
/Class
/Device
/CDCClassDevice.c
41 VPATH
+= $(TMK_PATH
)/$(LUFA_DIR
)
42 VPATH
+= $(TMK_PATH
)/$(LUFA_PATH
)
45 #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
48 #ifdef EXTRAKEY_ENABLE
51 # LUFA library compile-time options and predefined tokens
52 LUFA_OPTS
= -DUSB_DEVICE_ONLY
53 LUFA_OPTS
+= -DUSE_FLASH_DESCRIPTORS
54 LUFA_OPTS
+= -DUSE_STATIC_OPTIONS
="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
55 #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
56 LUFA_OPTS
+= -DFIXED_CONTROL_ENDPOINT_SIZE
=8
57 LUFA_OPTS
+= -DFIXED_NUM_CONFIGURATIONS
=1
59 # Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361
60 ifeq ($(MCU
),atmega32u2
)
61 LUFA_OPTS
+= -DNO_LIMITED_CONTROLLER_CONNECT
64 OPT_DEFS
+= -DF_USB
=$(F_USB
)UL
65 OPT_DEFS
+= -DARCH
=ARCH_
$(ARCH
)
66 OPT_DEFS
+= $(LUFA_OPTS
)
68 # This indicates using LUFA stack
69 OPT_DEFS
+= -DPROTOCOL_LUFA