Makefile 3.6 KB

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