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.

61 lines
1.9 KiB

  1. # Copyright 2017 Jack Humbert
  2. #
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # If it's possible that multiple bootloaders can be used for one project,
  16. # you can leave this unset, and the correct size will be selected
  17. # automatically.
  18. #
  19. # Sets the bootloader defined in the keyboard's/keymap's rules.mk
  20. # Current options:
  21. # atmel-dfu
  22. # lufa-dfu
  23. # qmk-dfu
  24. # halfkay
  25. # caterina
  26. # bootloadHID
  27. #
  28. # BOOTLOADER_SIZE can still be defined manually, but it's recommended
  29. # you add any possible configuration to this list
  30. ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
  31. OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
  32. OPT_DEFS += -DBOOTLOADER_DFU
  33. BOOTLOADER_SIZE = 4096
  34. endif
  35. ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
  36. OPT_DEFS += -DBOOTLOADER_LUFA_DFU
  37. OPT_DEFS += -DBOOTLOADER_DFU
  38. BOOTLOADER_SIZE = 4096
  39. endif
  40. ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
  41. OPT_DEFS += -DBOOTLOADER_QMK_DFU
  42. OPT_DEFS += -DBOOTLOADER_DFU
  43. BOOTLOADER_SIZE = 4096
  44. endif
  45. ifeq ($(strip $(BOOTLOADER)), halfkay)
  46. OPT_DEFS += -DBOOTLOADER_HALFKAY
  47. BOOTLOADER_SIZE = 512
  48. endif
  49. ifeq ($(strip $(BOOTLOADER)), caterina)
  50. OPT_DEFS += -DBOOTLOADER_CATERINA
  51. BOOTLOADER_SIZE = 4096
  52. endif
  53. ifeq ($(strip $(BOOTLOADER)), bootloadHID)
  54. OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
  55. BOOTLOADER_SIZE = 4096
  56. endif
  57. ifdef BOOTLOADER_SIZE
  58. OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
  59. endif