2012-06-28 14:05:21 +00:00
|
|
|
LUFA_DIR = protocol/lufa
|
|
|
|
|
|
|
|
# Path to the LUFA library
|
2017-07-07 16:06:59 +00:00
|
|
|
LUFA_PATH = $(LIB_PATH)/lufa
|
2014-04-25 03:52:47 +00:00
|
|
|
|
2013-02-11 13:56:30 +00:00
|
|
|
|
|
|
|
# Create the LUFA source path variables by including the LUFA makefile
|
2017-07-07 16:06:59 +00:00
|
|
|
ifneq (, $(wildcard $(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
|
2013-02-11 13:56:30 +00:00
|
|
|
# New build system from 20120730
|
|
|
|
LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
|
2017-07-07 16:06:59 +00:00
|
|
|
DMBS_LUFA_PATH = $(LUFA_PATH)/LUFA/Build/LUFA
|
|
|
|
include $(LUFA_PATH)/LUFA/Build/lufa_sources.mk
|
2013-02-11 13:56:30 +00:00
|
|
|
else
|
2017-07-07 16:06:59 +00:00
|
|
|
include $(LUFA_PATH)/LUFA/makefile
|
2013-02-11 13:56:30 +00:00
|
|
|
endif
|
2012-06-28 14:05:21 +00:00
|
|
|
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 17:31:31 +00:00
|
|
|
LUFA_SRC = lufa.c \
|
2020-06-17 11:43:20 +00:00
|
|
|
usb_descriptor.c \
|
|
|
|
$(LUFA_SRC_USB)
|
2015-08-24 23:31:12 +00:00
|
|
|
|
2016-04-15 04:26:22 +00:00
|
|
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
2016-06-18 18:30:24 +00:00
|
|
|
include $(TMK_PATH)/protocol/midi.mk
|
2015-08-24 23:31:12 +00:00
|
|
|
endif
|
2012-08-25 06:49:08 +00:00
|
|
|
|
2017-03-24 16:53:55 +00:00
|
|
|
ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
|
2020-08-25 09:03:45 +00:00
|
|
|
LUFA_SRC += outputselect.c \
|
2020-06-17 11:43:20 +00:00
|
|
|
$(TMK_DIR)/protocol/serial_uart.c
|
2016-11-28 06:48:04 +00:00
|
|
|
endif
|
|
|
|
|
2017-03-24 16:53:55 +00:00
|
|
|
ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
|
2020-06-17 11:43:20 +00:00
|
|
|
LUFA_SRC += spi_master.c \
|
|
|
|
analog.c \
|
|
|
|
outputselect.c \
|
|
|
|
$(LUFA_DIR)/adafruit_ble.cpp
|
2017-03-24 16:53:55 +00:00
|
|
|
endif
|
|
|
|
|
2017-03-30 03:03:04 +00:00
|
|
|
ifeq ($(strip $(BLUETOOTH)), RN42)
|
2020-08-25 09:03:45 +00:00
|
|
|
LUFA_SRC += outputselect.c \
|
2020-06-17 11:43:20 +00:00
|
|
|
$(TMK_DIR)/protocol/serial_uart.c
|
2017-03-30 03:03:04 +00:00
|
|
|
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 06:49:08 +00:00
|
|
|
SRC += $(LUFA_SRC)
|
2021-02-28 15:52:58 +00:00
|
|
|
SRC += $(LUFA_DIR)/usb_util.c
|
2012-06-28 14:05:21 +00:00
|
|
|
|
|
|
|
# Search Path
|
Makefile redo & other features (#395)
* .build containment implemented
* no destructive variable setting - builds in either folder
* make from 3 places
* cleans before each build
* make from root with keyboard=keyboard, keymap=keymap
* make from keyboard/keyboard with keymap=keymap
* make from keymaps/keymap
* only implemented on planck
* adds color diag to avr-gcc
* makefiles for all plancks, clean-up
* quick build-all makefile for plancks
* reformatting of make output (colors)
* color toggle, tmk path corrections
* correct if statement for color
* move config.h to main makefile, updates preonic, atomic
* format update, all keyboards targets
* makefile optional for build all target, alps and arrow_pad updated
* alps updated
* make planck default, trying out travis recipe for all-keyboards
* all-keymaps target, different travis recipe
* updates alps64
* updates keyboards to new format
* updates clue* projects
* all projects updated, specialise EZ .hex, let .hex through
* updates travis
* automatically find root, keyboard, keymap
* silent echo, cleaned-up mass make output
* updates all keyboards' .hex files except EZ
* Rename Bantam44.c to bantam44.c
* Rename Bantam44.h to bantam44.h
* nananana
* adds six key keyboard
* does same to ez as rest
* updates send_string example
* brings ergodox_ez up to date
* updates template/new project script
* adds sixkeyboard
* adds readme for sixkeyboard
* adds sixkeyboard to travis
* filenames, gitignore mess
* define clock prescaler stuff manually
* make quick, size test example
* documentation and dfu-no-build
2016-06-11 17:31:31 +00:00
|
|
|
VPATH += $(TMK_PATH)/$(LUFA_DIR)
|
2017-07-07 16:06:59 +00:00
|
|
|
VPATH += $(LUFA_PATH)
|
2019-09-03 18:29:23 +00:00
|
|
|
VPATH += $(DRIVER_PATH)/avr
|
2012-06-28 14:05:21 +00: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 02:26:06 +00: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
|
2018-02-08 20:07:46 +00:00
|
|
|
LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
|
2017-03-24 16:53:55 +00:00
|
|
|
LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
|
2014-04-24 02:26:06 +00:00
|
|
|
LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
|
2012-06-28 14:05:21 +00:00
|
|
|
|
2016-06-22 02:39:54 +00: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 14:05:21 +00:00
|
|
|
OPT_DEFS += -DF_USB=$(F_USB)UL
|
|
|
|
OPT_DEFS += -DARCH=ARCH_$(ARCH)
|
|
|
|
OPT_DEFS += $(LUFA_OPTS)
|
2013-03-09 02:22:27 +00:00
|
|
|
|
|
|
|
# This indicates using LUFA stack
|
|
|
|
OPT_DEFS += -DPROTOCOL_LUFA
|