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.

Makefile 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Target file name (without extension).
  2. TARGET ?= luddite
  3. # Directory common source filess exist
  4. TMK_DIR ?= ../../tmk_core
  5. # Directory keyboard dependent files exist
  6. TARGET_DIR ?= .
  7. # project specific files
  8. SRC ?= matrix.c \
  9. led.c \
  10. backlight.c \
  11. rgblight.c \
  12. light_ws2812.c
  13. CONFIG_H ?= config.h
  14. # MCU name
  15. MCU ?= atmega32u4
  16. # Processor frequency.
  17. # This will define a symbol, F_CPU, in all source code files equal to the
  18. # processor frequency in Hz. You can then use this symbol in your source code to
  19. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  20. # automatically to create a 32-bit value in your source code.
  21. #
  22. # This will be an integer division of F_USB below, as it is sourced by
  23. # F_USB after it has run through any CPU prescalers. Note that this value
  24. # does not *change* the processor frequency - it should merely be updated to
  25. # reflect the processor speed set externally so that the code can use accurate
  26. # software delays.
  27. F_CPU ?= 16000000
  28. #
  29. # LUFA specific
  30. #
  31. # Target architecture (see library "Board Types" documentation).
  32. ARCH ?= AVR8
  33. # Input clock frequency.
  34. # This will define a symbol, F_USB, in all source code files equal to the
  35. # input clock frequency (before any prescaling is performed) in Hz. This value may
  36. # differ from F_CPU if prescaling is used on the latter, and is required as the
  37. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  38. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  39. # at the end, this will be done automatically to create a 32-bit value in your
  40. # source code.
  41. #
  42. # If no clock division is performed on the input clock inside the AVR (via the
  43. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  44. F_USB ?= $(F_CPU)
  45. # Interrupt driven control endpoint task(+60)
  46. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  47. # Boot Section Size in *bytes*
  48. # Teensy halfKay 512
  49. # Teensy++ halfKay 1024
  50. # Atmel DFU loader 4096
  51. # LUFA bootloader 4096
  52. # USBaspLoader 2048
  53. BOOTLOADER_SIZE ?= 4096
  54. OPT_DEFS += -DBOOTLOADER_SIZE=$(BOOTLOADER_SIZE)
  55. # Build Options
  56. # comment out to disable the options.
  57. #
  58. BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
  59. MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
  60. EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
  61. CONSOLE_ENABLE ?= yes # Console for debug(+400)
  62. COMMAND_ENABLE ?= yes # Commands for debug and configuration
  63. #SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
  64. NKRO_ENABLE ?= yes # USB Nkey Rollover
  65. #ACTIONMAP_ENABLE ?= yes # Use 16bit action codes in keymap instead of 8bit keycodes
  66. BACKLIGHT_ENABLE = yes
  67. #
  68. # Keymap file
  69. #
  70. ifeq (yes,$(strip $(UNIMAP_ENABLE)))
  71. KEYMAP_FILE = unimap
  72. else
  73. ifeq (yes,$(strip $(ACTIONMAP_ENABLE)))
  74. KEYMAP_FILE = actionmap
  75. else
  76. KEYMAP_FILE = keymap
  77. endif
  78. endif
  79. ifdef KEYMAP
  80. SRC := $(KEYMAP_FILE)_$(KEYMAP).c $(SRC)
  81. else
  82. SRC := $(KEYMAP_FILE)_luddite.c $(SRC)
  83. endif
  84. # Optimize size but this may cause error "relocation truncated to fit"
  85. #EXTRALDFLAGS = -Wl,--relax
  86. # Search Path
  87. VPATH += $(TARGET_DIR)
  88. VPATH += $(TMK_DIR)
  89. include $(TMK_DIR)/protocol/lufa.mk
  90. include $(TMK_DIR)/common.mk
  91. include $(TMK_DIR)/rules.mk