Files
zsa_qmk_firmware/tmk_core/protocol/lufa.mk
T

82 lines
2.1 KiB
Makefile
Raw Normal View History

2012-06-28 23:05:21 +09:00
LUFA_DIR = protocol/lufa
# Path to the LUFA library
2017-07-07 12:06:59 -04:00
LUFA_PATH = $(LIB_PATH)/lufa
2014-04-25 12:52:47 +09:00
2013-02-11 22:56:30 +09:00
# Create the LUFA source path variables by including the LUFA makefile
2017-07-07 12:06:59 -04:00
ifneq (, $(wildcard $(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
2013-02-11 22:56:30 +09:00
# New build system from 20120730
LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
2017-07-07 12:06:59 -04:00
DMBS_LUFA_PATH = $(LUFA_PATH)/LUFA/Build/LUFA
include $(LUFA_PATH)/LUFA/Build/lufa_sources.mk
2013-02-11 22:56:30 +09:00
else
2017-07-07 12:06:59 -04:00
include $(LUFA_PATH)/LUFA/makefile
2013-02-11 22:56:30 +09:00
endif
2012-06-28 23:05:21 +09:00
2016-06-11 13:31:31 -04:00
LUFA_SRC = lufa.c \
descriptor.c \
outputselect.c \
2015-08-24 19:31:12 -04:00
$(LUFA_SRC_USB)
2016-04-15 00:26:22 -04:00
ifeq ($(strip $(MIDI_ENABLE)), yes)
include $(TMK_PATH)/protocol/midi.mk
2015-08-24 19:31:12 -04:00
endif
2012-08-25 15:49:08 +09:00
2017-03-24 12:53:55 -04:00
ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
$(TMK_DIR)/protocol/serial_uart.c
2016-11-27 22:48:04 -08:00
endif
2017-03-24 12:53:55 -04:00
ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp
endif
ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey)
2015-10-23 20:12:04 -04:00
LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
2015-10-27 12:42:30 -04:00
$(TMK_DIR)/protocol/serial_uart.c
2015-10-23 20:12:04 -04:00
endif
2017-03-29 23:03:04 -04:00
ifeq ($(strip $(BLUETOOTH)), RN42)
LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
$(TMK_DIR)/protocol/serial_uart.c
endif
2016-08-01 05:02:52 +00:00
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c
endif
2012-08-25 15:49:08 +09:00
SRC += $(LUFA_SRC)
2012-06-28 23:05:21 +09:00
# Search Path
2016-06-11 13:31:31 -04:00
VPATH += $(TMK_PATH)/$(LUFA_DIR)
2017-07-07 12:06:59 -04:00
VPATH += $(LUFA_PATH)
2012-06-28 23:05:21 +09:00
# Option modules
#ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
#endif
#ifdef EXTRAKEY_ENABLE
#endif
# LUFA library compile-time options and predefined tokens
2014-04-24 11:26:06 +09:00
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
2017-03-24 12:53:55 -04:00
LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
2014-04-24 11:26:06 +09:00
LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
2012-06-28 23:05:21 +09:00
# Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361
ifeq ($(MCU),atmega32u2)
LUFA_OPTS += -DNO_LIMITED_CONTROLLER_CONNECT
endif
2012-06-28 23:05:21 +09:00
OPT_DEFS += -DF_USB=$(F_USB)UL
OPT_DEFS += -DARCH=ARCH_$(ARCH)
OPT_DEFS += $(LUFA_OPTS)
2013-03-09 11:22:27 +09:00
# This indicates using LUFA stack
OPT_DEFS += -DPROTOCOL_LUFA