Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. # Target file name (without extension).
  17. TARGET = ergodox_ez
  18. # Directory common source filess exist
  19. TOP_DIR = ../..
  20. TMK_DIR = ../../tmk_core
  21. # Directory keyboard dependent files exist
  22. TARGET_DIR = .
  23. # # project specific files
  24. SRC = ergodox_ez.c \
  25. twimaster.c \
  26. matrix.c
  27. ifdef KEYMAP
  28. SRC := keymaps/$(KEYMAP)/keymap.c $(SRC)
  29. else
  30. SRC := keymaps/default/keymap.c $(SRC)
  31. endif
  32. CONFIG_H = config.h
  33. # MCU name
  34. MCU = atmega32u4
  35. # Processor frequency.
  36. # This will define a symbol, F_CPU, in all source code files equal to the
  37. # processor frequency in Hz. You can then use this symbol in your source code to
  38. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  39. # automatically to create a 32-bit value in your source code.
  40. #
  41. # This will be an integer division of F_USB below, as it is sourced by
  42. # F_USB after it has run through any CPU prescalers. Note that this value
  43. # does not *change* the processor frequency - it should merely be updated to
  44. # reflect the processor speed set externally so that the code can use accurate
  45. # software delays.
  46. F_CPU = 16000000
  47. #
  48. # LUFA specific
  49. #
  50. # Target architecture (see library "Board Types" documentation).
  51. ARCH = AVR8
  52. # Input clock frequency.
  53. # This will define a symbol, F_USB, in all source code files equal to the
  54. # input clock frequency (before any prescaling is performed) in Hz. This value may
  55. # differ from F_CPU if prescaling is used on the latter, and is required as the
  56. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  57. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  58. # at the end, this will be done automatically to create a 32-bit value in your
  59. # source code.
  60. #
  61. # If no clock division is performed on the input clock inside the AVR (via the
  62. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  63. F_USB = $(F_CPU)
  64. # Interrupt driven control endpoint task(+60)
  65. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  66. # Boot Section Size in *bytes*
  67. # Teensy halfKay 512
  68. # Teensy++ halfKay 1024
  69. # Atmel DFU loader 4096
  70. # LUFA bootloader 4096
  71. # USBaspLoader 2048
  72. OPT_DEFS += -DBOOTLOADER_SIZE=512
  73. # Build Options
  74. # comment out to disable the options.
  75. #
  76. BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  77. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  78. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  79. # CONSOLE_ENABLE = yes # Console for debug(+400)
  80. COMMAND_ENABLE = yes # Commands for debug and configuration
  81. CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
  82. SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
  83. NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
  84. # MIDI_ENABLE = yes # MIDI controls
  85. # UNICODE_ENABLE = yes # Unicode
  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 += $(TOP_DIR)
  91. VPATH += $(TMK_DIR)
  92. include $(TOP_DIR)/quantum/quantum.mk