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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

common.mk 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. COMMON_DIR = common
  2. SRC += $(COMMON_DIR)/host.c \
  3. $(COMMON_DIR)/keyboard.c \
  4. $(COMMON_DIR)/action.c \
  5. $(COMMON_DIR)/action_tapping.c \
  6. $(COMMON_DIR)/action_macro.c \
  7. $(COMMON_DIR)/action_layer.c \
  8. $(COMMON_DIR)/action_util.c \
  9. $(COMMON_DIR)/keymap.c \
  10. $(COMMON_DIR)/timer.c \
  11. $(COMMON_DIR)/print.c \
  12. $(COMMON_DIR)/bootloader.c \
  13. $(COMMON_DIR)/suspend.c \
  14. $(COMMON_DIR)/xprintf.S \
  15. $(COMMON_DIR)/util.c
  16. # Option modules
  17. ifdef BOOTMAGIC_ENABLE
  18. SRC += $(COMMON_DIR)/bootmagic.c
  19. SRC += $(COMMON_DIR)/eeconfig.c
  20. OPT_DEFS += -DBOOTMAGIC_ENABLE
  21. endif
  22. ifdef MOUSEKEY_ENABLE
  23. SRC += $(COMMON_DIR)/mousekey.c
  24. OPT_DEFS += -DMOUSEKEY_ENABLE
  25. OPT_DEFS += -DMOUSE_ENABLE
  26. endif
  27. ifdef EXTRAKEY_ENABLE
  28. OPT_DEFS += -DEXTRAKEY_ENABLE
  29. endif
  30. ifdef CONSOLE_ENABLE
  31. OPT_DEFS += -DCONSOLE_ENABLE
  32. else
  33. OPT_DEFS += -DNO_PRINT
  34. OPT_DEFS += -DNO_DEBUG
  35. endif
  36. ifdef COMMAND_ENABLE
  37. SRC += $(COMMON_DIR)/command.c
  38. OPT_DEFS += -DCOMMAND_ENABLE
  39. endif
  40. ifdef NKRO_ENABLE
  41. OPT_DEFS += -DNKRO_ENABLE
  42. endif
  43. ifdef SLEEP_LED_ENABLE
  44. SRC += $(COMMON_DIR)/sleep_led.c
  45. OPT_DEFS += -DSLEEP_LED_ENABLE
  46. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
  47. endif
  48. ifdef BACKLIGHT_ENABLE
  49. SRC += $(COMMON_DIR)/backlight.c
  50. OPT_DEFS += -DBACKLIGHT_ENABLE
  51. endif
  52. ifdef KEYMAP_SECTION_ENABLE
  53. OPT_DEFS += -DKEYMAP_SECTION_ENABLE
  54. EXTRALDFLAGS = -Wl,-L$(TOP_DIR),-Tldscript_keymap_avr5.x
  55. endif
  56. # Version string
  57. OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null)
  58. # Search Path
  59. VPATH += $(TOP_DIR)/common