rules.mk 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #----------------------------------------------------------------------------
  2. # On command line:
  3. #
  4. # make = Make software.
  5. #
  6. # make clean = Clean out built project files.
  7. #
  8. # That's pretty much all you need. To compile, always go make clean,
  9. # followed by make.
  10. #
  11. # For advanced users only:
  12. # make teensy = Download the hex file to the device, using teensy_loader_cli.
  13. # (must have teensy_loader_cli installed).
  14. #
  15. #----------------------------------------------------------------------------
  16. # # project specific files
  17. SRC += matrix.c
  18. # MCU name
  19. MCU = atmega32u4
  20. # Processor frequency.
  21. # This will define a symbol, F_CPU, in all source code files equal to the
  22. # processor frequency in Hz. You can then use this symbol in your source code to
  23. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  24. # automatically to create a 32-bit value in your source code.
  25. #
  26. # This will be an integer division of F_USB below, as it is sourced by
  27. # F_USB after it has run through any CPU prescalers. Note that this value
  28. # does not *change* the processor frequency - it should merely be updated to
  29. # reflect the processor speed set externally so that the code can use accurate
  30. # software delays.
  31. F_CPU = 16000000
  32. #
  33. # LUFA specific
  34. #
  35. # Target architecture (see library "Board Types" documentation).
  36. ARCH = AVR8
  37. # Input clock frequency.
  38. # This will define a symbol, F_USB, in all source code files equal to the
  39. # input clock frequency (before any prescaling is performed) in Hz. This value may
  40. # differ from F_CPU if prescaling is used on the latter, and is required as the
  41. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  42. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  43. # at the end, this will be done automatically to create a 32-bit value in your
  44. # source code.
  45. #
  46. # If no clock division is performed on the input clock inside the AVR (via the
  47. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  48. F_USB = $(F_CPU)
  49. # Bootloader
  50. # This definition is optional, and if your keyboard supports multiple bootloaders of
  51. # different sizes, comment this out, and the correct address will be loaded
  52. # automatically (+60). See bootloader.mk for all options.
  53. BOOTLOADER = halfkay
  54. # Interrupt driven control endpoint task(+60)
  55. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  56. # If you have Left LEDs (see
  57. # https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for
  58. # details), include the following define:
  59. # OPT_DEFS += -DLEFT_LEDS
  60. # Build Options
  61. # comment out to disable the options.
  62. #
  63. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
  64. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  65. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  66. CONSOLE_ENABLE = no # Console for debug(+400)
  67. COMMAND_ENABLE = yes # Commands for debug and configuration
  68. CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
  69. NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
  70. UNICODE_ENABLE = yes # Unicode
  71. SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
  72. SLEEP_LED_ENABLE = no
  73. API_SYSEX_ENABLE = no
  74. RGBLIGHT_ENABLE = yes
  75. RGB_MATRIX_ENABLE = no # enable later
  76. ifeq ($(strip $(RGB_MATRIX_ENABLE)), no)
  77. SRC += i2c_master.c
  78. endif
  79. LAYOUTS = ergodox