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