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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Makefile 3.1KB

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