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.
60 lines
1.5 KiB
60 lines
1.5 KiB
13 years ago
|
LUFA_DIR = protocol/lufa
|
||
|
|
||
|
# Path to the LUFA library
|
||
10 years ago
|
LUFA_PATH ?= $(LUFA_DIR)/LUFA-git
|
||
11 years ago
|
|
||
12 years ago
|
|
||
|
# Create the LUFA source path variables by including the LUFA makefile
|
||
10 years ago
|
ifneq (, $(wildcard $(TMK_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
|
||
12 years ago
|
# New build system from 20120730
|
||
|
LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
|
||
10 years ago
|
include $(TMK_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk
|
||
12 years ago
|
else
|
||
10 years ago
|
include $(TMK_DIR)/$(LUFA_PATH)/LUFA/makefile
|
||
12 years ago
|
endif
|
||
13 years ago
|
|
||
|
LUFA_SRC = $(LUFA_DIR)/lufa.c \
|
||
|
$(LUFA_DIR)/descriptor.c \
|
||
9 years ago
|
$(LUFA_SRC_USB)
|
||
|
|
||
|
ifdef MIDI_ENABLE
|
||
|
LUFA_SRC += $(LUFA_DIR)/midi/midi.c \
|
||
9 years ago
|
$(LUFA_DIR)/midi/midi_device.c \
|
||
|
$(LUFA_DIR)/midi/bytequeue/bytequeue.c \
|
||
|
$(LUFA_DIR)/midi/bytequeue/interrupt_setting.c \
|
||
9 years ago
|
$(LUFA_SRC_USBCLASS)
|
||
9 years ago
|
endif
|
||
13 years ago
|
|
||
9 years ago
|
ifdef BLUETOOTH_ENABLE
|
||
|
LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
|
||
9 years ago
|
$(TMK_DIR)/protocol/serial_uart.c
|
||
9 years ago
|
endif
|
||
|
|
||
13 years ago
|
SRC += $(LUFA_SRC)
|
||
13 years ago
|
|
||
|
# Search Path
|
||
10 years ago
|
VPATH += $(TMK_DIR)/$(LUFA_DIR)
|
||
|
VPATH += $(TMK_DIR)/$(LUFA_PATH)
|
||
13 years ago
|
|
||
|
# Option modules
|
||
|
#ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
|
||
|
#endif
|
||
|
|
||
|
#ifdef EXTRAKEY_ENABLE
|
||
|
#endif
|
||
|
|
||
|
# 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)"
|
||
|
#LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
|
||
|
LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
|
||
|
LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
|
||
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
|