Keyboard firmwares for Atmel AVR and Cortex-M
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.

common.mk 1.7KB

11 vuotta sitten
11 vuotta sitten
11 vuotta sitten
13 vuotta sitten
13 vuotta sitten
13 vuotta sitten
13 vuotta sitten
13 vuotta sitten
11 vuotta sitten
10 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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_oneshot.c \
  7. $(COMMON_DIR)/action_macro.c \
  8. $(COMMON_DIR)/action_layer.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. endif
  26. ifdef EXTRAKEY_ENABLE
  27. OPT_DEFS += -DEXTRAKEY_ENABLE
  28. endif
  29. ifdef CONSOLE_ENABLE
  30. OPT_DEFS += -DCONSOLE_ENABLE
  31. else
  32. OPT_DEFS += -DNO_PRINT
  33. OPT_DEFS += -DNO_DEBUG
  34. endif
  35. ifdef COMMAND_ENABLE
  36. SRC += $(COMMON_DIR)/command.c
  37. OPT_DEFS += -DCOMMAND_ENABLE
  38. endif
  39. ifdef NKRO_ENABLE
  40. OPT_DEFS += -DNKRO_ENABLE
  41. endif
  42. ifdef PS2_MOUSE_ENABLE
  43. SRC += $(COMMON_DIR)/ps2.c \
  44. $(COMMON_DIR)/ps2_mouse.c
  45. OPT_DEFS += -DPS2_MOUSE_ENABLE
  46. endif
  47. ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE)
  48. OPT_DEFS += -DMOUSE_ENABLE
  49. endif
  50. ifdef SLEEP_LED_ENABLE
  51. SRC += $(COMMON_DIR)/sleep_led.c
  52. OPT_DEFS += -DSLEEP_LED_ENABLE
  53. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
  54. endif
  55. ifdef BACKLIGHT_ENABLE
  56. SRC += $(COMMON_DIR)/backlight.c
  57. OPT_DEFS += -DBACKLIGHT_ENABLE
  58. endif
  59. ifdef KEYMAP_SECTION_ENABLE
  60. OPT_DEFS += -DKEYMAP_SECTION
  61. EXTRALDFLAGS = -Wl,-L$(TOP_DIR),-Tldscript_keymap_avr5.x
  62. endif
  63. # Version string
  64. OPT_DEFS += -DVERSION=$(shell (git describe --dirty || echo 'unknown') 2> /dev/null)
  65. # Search Path
  66. VPATH += $(TOP_DIR)/common