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

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