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.

81 lines
2.1 KiB

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
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
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
8 years ago
  1. LUFA_DIR = protocol/lufa
  2. # Path to the LUFA library
  3. LUFA_PATH = $(LIB_PATH)/lufa
  4. # Create the LUFA source path variables by including the LUFA makefile
  5. ifneq (, $(wildcard $(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
  6. # New build system from 20120730
  7. LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
  8. DMBS_LUFA_PATH = $(LUFA_PATH)/LUFA/Build/LUFA
  9. include $(LUFA_PATH)/LUFA/Build/lufa_sources.mk
  10. else
  11. include $(LUFA_PATH)/LUFA/makefile
  12. endif
  13. LUFA_SRC = lufa.c \
  14. descriptor.c \
  15. outputselect.c \
  16. $(LUFA_SRC_USB)
  17. ifeq ($(strip $(MIDI_ENABLE)), yes)
  18. include $(TMK_PATH)/protocol/midi.mk
  19. endif
  20. ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
  21. LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
  22. $(TMK_DIR)/protocol/serial_uart.c
  23. endif
  24. ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
  25. LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp
  26. endif
  27. ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey)
  28. LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
  29. $(TMK_DIR)/protocol/serial_uart.c
  30. endif
  31. ifeq ($(strip $(BLUETOOTH)), RN42)
  32. LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
  33. $(TMK_DIR)/protocol/serial_uart.c
  34. endif
  35. ifeq ($(strip $(VIRTSER_ENABLE)), yes)
  36. LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c
  37. endif
  38. SRC += $(LUFA_SRC)
  39. # Search Path
  40. VPATH += $(TMK_PATH)/$(LUFA_DIR)
  41. VPATH += $(LUFA_PATH)
  42. # Option modules
  43. #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
  44. #endif
  45. #ifdef EXTRAKEY_ENABLE
  46. #endif
  47. # LUFA library compile-time options and predefined tokens
  48. LUFA_OPTS = -DUSB_DEVICE_ONLY
  49. LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS
  50. LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
  51. #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
  52. LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
  53. LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
  54. LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
  55. # Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361
  56. ifeq ($(MCU),atmega32u2)
  57. LUFA_OPTS += -DNO_LIMITED_CONTROLLER_CONNECT
  58. endif
  59. OPT_DEFS += -DF_USB=$(F_USB)UL
  60. OPT_DEFS += -DARCH=ARCH_$(ARCH)
  61. OPT_DEFS += $(LUFA_OPTS)
  62. # This indicates using LUFA stack
  63. OPT_DEFS += -DPROTOCOL_LUFA