Adhoc fix compile error of usb_usb
[tmk_keyboard.git] / common.mk
CommitLineData
cc68adeb 1COMMON_DIR = common
2SRC += $(COMMON_DIR)/host.c \
3 $(COMMON_DIR)/keyboard.c \
8a709c27 4 $(COMMON_DIR)/action.c \
c69f7e10 5 $(COMMON_DIR)/action_tapping.c \
aad91a30 6 $(COMMON_DIR)/action_macro.c \
c6d88d27 7 $(COMMON_DIR)/action_layer.c \
d52d5543 8 $(COMMON_DIR)/action_util.c \
1e3e41a2 9 $(COMMON_DIR)/keymap.c \
cc68adeb 10 $(COMMON_DIR)/timer.c \
11 $(COMMON_DIR)/print.c \
ea524d7b 12 $(COMMON_DIR)/debug.c \
cc68adeb 13 $(COMMON_DIR)/bootloader.c \
2c0bb5e7 14 $(COMMON_DIR)/suspend.c \
d9c06db6 15 $(COMMON_DIR)/xprintf.S \
cc68adeb 16 $(COMMON_DIR)/util.c
6b0c939d 17
9a938eec 18
6b0c939d 19# Option modules
ef8439bd 20ifdef BOOTMAGIC_ENABLE
21 SRC += $(COMMON_DIR)/bootmagic.c
22 SRC += $(COMMON_DIR)/eeconfig.c
23 OPT_DEFS += -DBOOTMAGIC_ENABLE
24endif
25
2a562a41 26ifdef MOUSEKEY_ENABLE
cc68adeb 27 SRC += $(COMMON_DIR)/mousekey.c
9a938eec 28 OPT_DEFS += -DMOUSEKEY_ENABLE
676d94d1 29 OPT_DEFS += -DMOUSE_ENABLE
2a562a41 30endif
acc974c6 31
e67c9888 32ifdef EXTRAKEY_ENABLE
33 OPT_DEFS += -DEXTRAKEY_ENABLE
9a938eec 34endif
35
e075361b 36ifdef CONSOLE_ENABLE
37 OPT_DEFS += -DCONSOLE_ENABLE
9a106537 38else
39 OPT_DEFS += -DNO_PRINT
40 OPT_DEFS += -DNO_DEBUG
e075361b 41endif
42
16870412 43ifdef COMMAND_ENABLE
44 SRC += $(COMMON_DIR)/command.c
45 OPT_DEFS += -DCOMMAND_ENABLE
46endif
47
e67c9888 48ifdef NKRO_ENABLE
49 OPT_DEFS += -DNKRO_ENABLE
9a938eec 50endif
51
ac570686
KR
52ifdef USB_6KRO_ENABLE
53 OPT_DEFS += -DUSB_6KRO_ENABLE
54endif
55
f0c5f1b9 56ifdef SLEEP_LED_ENABLE
57 SRC += $(COMMON_DIR)/sleep_led.c
58 OPT_DEFS += -DSLEEP_LED_ENABLE
2c0bb5e7 59 OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
f0c5f1b9 60endif
61
1eb8523e
W
62ifdef BACKLIGHT_ENABLE
63 SRC += $(COMMON_DIR)/backlight.c
64 OPT_DEFS += -DBACKLIGHT_ENABLE
65endif
66
259c4a04 67ifdef KEYMAP_SECTION_ENABLE
9f29fa6b 68 OPT_DEFS += -DKEYMAP_SECTION_ENABLE
259c4a04 69 EXTRALDFLAGS = -Wl,-L$(TOP_DIR),-Tldscript_keymap_avr5.x
70endif
f0c5f1b9 71
8bc96ac5 72# Version string
7e8a85ca 73OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null)
8bc96ac5 74
75
e67c9888 76# Search Path
63d82fca 77VPATH += $(TOP_DIR)/common
Imprint / Impressum