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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # Target file name (without extension).
  2. TARGET ?= next_usb
  3. # Directory common source filess exist
  4. TMK_DIR ?= ../../tmk_core
  5. # Directory keyboard dependent files exist
  6. TARGET_DIR ?= .
  7. # keyboard dependent files
  8. SRC ?= matrix.c \
  9. led.c
  10. CONFIG_H ?= config.h
  11. #
  12. # Keymap file
  13. #
  14. ifeq (yes,$(strip $(UNIMAP_ENABLE)))
  15. KEYMAP_FILE = unimap
  16. else
  17. ifeq (yes,$(strip $(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).c $(SRC)
  27. endif
  28. # MCU name, you MUST set this to match the board you are using
  29. # type "make clean" after changing this, so all files will be rebuilt
  30. #MCU = at90usb162 # Teensy 1.0
  31. #MCU = atmega32u4 # Teensy 2.0
  32. #MCU = at90usb646 # Teensy++ 1.0
  33. #MCU = at90usb1286 # Teensy++ 2.0
  34. MCU ?= atmega32u2 # TMK converter
  35. # Processor frequency.
  36. # Normally the first thing your program should do is set the clock prescaler,
  37. # so your program will run at the correct speed. You should also set this
  38. # variable to same clock speed. The _delay_ms() macro uses this, and many
  39. # examples use this variable to calculate timings. Do not add a "UL" here.
  40. F_CPU ?= 16000000
  41. #
  42. # LUFA specific
  43. #
  44. # Target architecture (see library "Board Types" documentation).
  45. ARCH ?= AVR8
  46. # Input clock frequency.
  47. # This will define a symbol, F_USB, in all source code files equal to the
  48. # input clock frequency (before any prescaling is performed) in Hz. This value may
  49. # differ from F_CPU if prescaling is used on the latter, and is required as the
  50. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  51. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  52. # at the end, this will be done automatically to create a 32-bit value in your
  53. # source code.
  54. #
  55. # If no clock division is performed on the input clock inside the AVR (via the
  56. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  57. F_USB ?= $(F_CPU)
  58. # Interrupt driven control endpoint task(+60)
  59. #OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  60. # Boot Section Size in *bytes*
  61. # Teensy halfKay 512
  62. # Teensy++ halfKay 1024
  63. # Atmel DFU loader 4096
  64. # LUFA bootloader 4096
  65. # USBaspLoader 2048
  66. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  67. # Build Options
  68. # *Comment out* to disable the options.
  69. #
  70. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  71. MOUSEKEY_ENABLE ?= yes # Mouse keys
  72. EXTRAKEY_ENABLE ?= yes # Audio control and System control
  73. CONSOLE_ENABLE ?= yes # Console for debug(+400)
  74. COMMAND_ENABLE ?= yes # Commands for debug and configuration
  75. #NKRO_ENABLE ?= yes # USB Nkey Rollover
  76. SRC += next_kbd.c
  77. # Search Path
  78. VPATH += $(TARGET_DIR)
  79. VPATH += $(TMK_DIR)
  80. include $(TMK_DIR)/protocol.mk
  81. include $(TMK_DIR)/protocol/lufa.mk
  82. include $(TMK_DIR)/common.mk
  83. include $(TMK_DIR)/rules.mk