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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Target file name (without extension).
  2. TARGET ?= adb_usb
  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. adb.c
  11. CONFIG_H = config.h
  12. # MCU name
  13. # atmega32u4 Teensy2.0
  14. # atemga32u4 TMK Converter rev.1
  15. # atemga32u2 TMK Converter rev.2
  16. MCU ?= atmega32u2
  17. # Processor frequency.
  18. # This will define a symbol, F_CPU, in all source code files equal to the
  19. # processor frequency in Hz. You can then use this symbol in your source code to
  20. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  21. # automatically to create a 32-bit value in your source code.
  22. #
  23. # This will be an integer division of F_USB below, as it is sourced by
  24. # F_USB after it has run through any CPU prescalers. Note that this value
  25. # does not *change* the processor frequency - it should merely be updated to
  26. # reflect the processor speed set externally so that the code can use accurate
  27. # software delays.
  28. F_CPU ?= 16000000
  29. #
  30. # LUFA specific
  31. #
  32. # Target architecture (see library "Board Types" documentation).
  33. ARCH ?= AVR8
  34. # Input clock frequency.
  35. # This will define a symbol, F_USB, in all source code files equal to the
  36. # input clock frequency (before any prescaling is performed) in Hz. This value may
  37. # differ from F_CPU if prescaling is used on the latter, and is required as the
  38. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  39. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  40. # at the end, this will be done automatically to create a 32-bit value in your
  41. # source code.
  42. #
  43. # If no clock division is performed on the input clock inside the AVR (via the
  44. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  45. F_USB ?= $(F_CPU)
  46. # Interrupt driven control endpoint task(+60)
  47. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  48. # Boot Section Size in *bytes*
  49. # Teensy halfKay 512
  50. # Teensy++ halfKay 1024
  51. # Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
  52. # LUFA bootloader 4096
  53. # USBaspLoader 2048
  54. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  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. ADB_MOUSE_ENABLE = yes
  66. #UNIMAP_ENABLE = yes
  67. #ACTIONMAP_ENABLE = yes # Use 16bit actionmap instead of 8bit keymap
  68. #KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor
  69. # ADB Mice need acceleration for todays much bigger screens.
  70. OPT_DEFS += -DADB_MOUSE_MAXACC=8
  71. # Optimize size but this may cause error "relocation truncated to fit"
  72. #EXTRALDFLAGS = -Wl,--relax
  73. #
  74. # Keymap file
  75. #
  76. ifdef UNIMAP_ENABLE
  77. KEYMAP_FILE = unimap
  78. else
  79. ifdef ACTIONMAP_ENABLE
  80. KEYMAP_FILE = actionmap
  81. else
  82. KEYMAP_FILE = keymap
  83. endif
  84. endif
  85. ifdef KEYMAP
  86. SRC := $(KEYMAP_FILE)_$(KEYMAP).c $(SRC)
  87. else
  88. SRC := $(KEYMAP_FILE)_plain.c $(SRC)
  89. endif
  90. # Search Path
  91. VPATH += $(TARGET_DIR)
  92. VPATH += $(TMK_DIR)
  93. include $(TMK_DIR)/protocol/lufa.mk
  94. include $(TMK_DIR)/protocol.mk
  95. include $(TMK_DIR)/common.mk
  96. include $(TMK_DIR)/rules.mk