You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
13 years ago
|
LUFA_DIR = protocol/lufa
|
||
|
|
||
|
# Path to the LUFA library
|
||
8 years ago
|
LUFA_PATH = $(LIB_PATH)/lufa
|
||
11 years ago
|
|
||
12 years ago
|
# Create the LUFA source path variables by including the LUFA makefile
|
||
8 years ago
|
ifneq (, $(wildcard $(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
|
||
12 years ago
|
# New build system from 20120730
|
||
|
LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
|
||
8 years ago
|
DMBS_LUFA_PATH = $(LUFA_PATH)/LUFA/Build/LUFA
|
||
|
include $(LUFA_PATH)/LUFA/Build/lufa_sources.mk
|
||
12 years ago
|
else
|
||
8 years ago
|
include $(LUFA_PATH)/LUFA/makefile
|
||
12 years ago
|
endif
|
||
13 years ago
|
|
||
9 years ago
|
LUFA_SRC = lufa.c \
|
||
5 years ago
|
usb_descriptor.c \
|
||
|
$(LUFA_SRC_USB)
|
||
10 years ago
|
|
||
2 years ago
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||
|
LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c
|
||
|
endif
|
||
|
|
||
9 years ago
|
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||
|
LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c
|
||
|
endif
|
||
|
|
||
13 years ago
|
SRC += $(LUFA_SRC)
|
||
4 years ago
|
SRC += $(LUFA_DIR)/usb_util.c
|
||
13 years ago
|
|
||
|
# Search Path
|
||
9 years ago
|
VPATH += $(TMK_PATH)/$(LUFA_DIR)
|
||
8 years ago
|
VPATH += $(LUFA_PATH)
|
||
13 years ago
|
|
||
|
# LUFA library compile-time options and predefined tokens
|
||
11 years ago
|
LUFA_OPTS = -DUSB_DEVICE_ONLY
|
||
|
LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS
|
||
|
LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
|
||
8 years ago
|
LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
|
||
11 years ago
|
LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
|
||
13 years ago
|
|
||
4 years ago
|
# Remote wakeup fix for ATmega16/32U2 https://github.com/tmk/tmk_keyboard/issues/361
|
||
|
ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2))
|
||
9 years ago
|
LUFA_OPTS += -DNO_LIMITED_CONTROLLER_CONNECT
|
||
|
endif
|
||
|
|
||
13 years ago
|
OPT_DEFS += -DF_USB=$(F_USB)UL
|
||
|
OPT_DEFS += -DARCH=ARCH_$(ARCH)
|
||
|
OPT_DEFS += $(LUFA_OPTS)
|
||
12 years ago
|
|
||
|
# This indicates using LUFA stack
|
||
|
OPT_DEFS += -DPROTOCOL_LUFA
|