]> git.gir.st - tmk_keyboard.git/blob - common.mk
Merge pull request #124 from kairyu/6kro
[tmk_keyboard.git] / common.mk
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
17
18 # Option modules
19 ifdef BOOTMAGIC_ENABLE
20 SRC += $(COMMON_DIR)/bootmagic.c
21 SRC += $(COMMON_DIR)/eeconfig.c
22 OPT_DEFS += -DBOOTMAGIC_ENABLE
23 endif
24
25 ifdef MOUSEKEY_ENABLE
26 SRC += $(COMMON_DIR)/mousekey.c
27 OPT_DEFS += -DMOUSEKEY_ENABLE
28 OPT_DEFS += -DMOUSE_ENABLE
29 endif
30
31 ifdef EXTRAKEY_ENABLE
32 OPT_DEFS += -DEXTRAKEY_ENABLE
33 endif
34
35 ifdef CONSOLE_ENABLE
36 OPT_DEFS += -DCONSOLE_ENABLE
37 else
38 OPT_DEFS += -DNO_PRINT
39 OPT_DEFS += -DNO_DEBUG
40 endif
41
42 ifdef COMMAND_ENABLE
43 SRC += $(COMMON_DIR)/command.c
44 OPT_DEFS += -DCOMMAND_ENABLE
45 endif
46
47 ifdef NKRO_ENABLE
48 OPT_DEFS += -DNKRO_ENABLE
49 endif
50
51 ifdef USB_6KRO_ENABLE
52 OPT_DEFS += -DUSB_6KRO_ENABLE
53 endif
54
55 ifdef SLEEP_LED_ENABLE
56 SRC += $(COMMON_DIR)/sleep_led.c
57 OPT_DEFS += -DSLEEP_LED_ENABLE
58 OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
59 endif
60
61 ifdef BACKLIGHT_ENABLE
62 SRC += $(COMMON_DIR)/backlight.c
63 OPT_DEFS += -DBACKLIGHT_ENABLE
64 endif
65
66 ifdef KEYMAP_SECTION_ENABLE
67 OPT_DEFS += -DKEYMAP_SECTION_ENABLE
68 EXTRALDFLAGS = -Wl,-L$(TOP_DIR),-Tldscript_keymap_avr5.x
69 endif
70
71 # Version string
72 OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null)
73
74
75 # Search Path
76 VPATH += $(TOP_DIR)/common
Imprint / Impressum