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

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