Keyboard firmwares for Atmel AVR and Cortex-M
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.

lufa.mk 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. LUFA_DIR = protocol/lufa
  2. # Path to the LUFA library
  3. LUFA_PATH ?= $(LUFA_DIR)/LUFA-git
  4. # Create the LUFA source path variables by including the LUFA makefile
  5. ifneq (, $(wildcard $(TMK_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
  6. # New build system from 20120730
  7. LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
  8. include $(TMK_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk
  9. else
  10. include $(TMK_DIR)/$(LUFA_PATH)/LUFA/makefile
  11. endif
  12. LUFA_SRC = $(LUFA_DIR)/lufa.c \
  13. $(LUFA_DIR)/descriptor.c \
  14. $(LUFA_SRC_USB)
  15. SRC += $(LUFA_SRC)
  16. # Search Path
  17. VPATH += $(TMK_DIR)/$(LUFA_DIR)
  18. VPATH += $(TMK_DIR)/$(LUFA_PATH)
  19. # Option modules
  20. #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
  21. #endif
  22. #ifdef EXTRAKEY_ENABLE
  23. #endif
  24. # LUFA library compile-time options and predefined tokens
  25. LUFA_OPTS = -DUSB_DEVICE_ONLY
  26. LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS
  27. LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
  28. #LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
  29. LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
  30. LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
  31. # Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361
  32. ifeq ($(MCU),atmega32u2)
  33. LUFA_OPTS += -DNO_LIMITED_CONTROLLER_CONNECT
  34. endif
  35. OPT_DEFS += -DF_USB=$(F_USB)UL
  36. OPT_DEFS += -DARCH=ARCH_$(ARCH)
  37. OPT_DEFS += $(LUFA_OPTS)
  38. # This indicates using LUFA stack
  39. OPT_DEFS += -DPROTOCOL_LUFA