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.2KB

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