aboutsummaryrefslogtreecommitdiff
path: root/tool/mbed/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tool/mbed/common.mk')
-rw-r--r--tool/mbed/common.mk79
1 files changed, 79 insertions, 0 deletions
diff --git a/tool/mbed/common.mk b/tool/mbed/common.mk
new file mode 100644
index 000000000..93a927a3e
--- /dev/null
+++ b/tool/mbed/common.mk
@@ -0,0 +1,79 @@
1OBJECTS += \
2 $(OBJDIR)/common/action.o \
3 $(OBJDIR)/common/action_tapping.o \
4 $(OBJDIR)/common/action_macro.o \
5 $(OBJDIR)/common/action_layer.o \
6 $(OBJDIR)/common/action_util.o \
7 $(OBJDIR)/common/host.o \
8 $(OBJDIR)/common/keymap.o \
9 $(OBJDIR)/common/keyboard.o \
10 $(OBJDIR)/common/util.o \
11 $(OBJDIR)/common/mbed/suspend.o \
12 $(OBJDIR)/common/mbed/timer.o \
13 $(OBJDIR)/common/mbed/xprintf.o \
14 $(OBJDIR)/common/mbed/bootloader.o \
15
16INCLUDE_PATHS += \
17 -I$(TMK_DIR)/common \
18 -I$(TMK_DIR)/protocol
19
20CC_FLAGS += -include $(CONFIG_H)
21
22
23
24# Option modules
25ifdef BOOTMAGIC_ENABLE
26 $(error Not Supported)
27 OBJECTS += $(OBJDIR)/common/bootmagic.o
28 OBJECTS += $(OBJDIR)/common/mbed/eeprom.o
29 OPT_DEFS += -DBOOTMAGIC_ENABLE
30endif
31
32ifdef MOUSEKEY_ENABLE
33 OBJECTS += $(OBJDIR)/common/mousekey.o
34 OPT_DEFS += -DMOUSEKEY_ENABLE
35 OPT_DEFS += -DMOUSE_ENABLE
36endif
37
38ifdef EXTRAKEY_ENABLE
39 $(error Not Supported)
40 OPT_DEFS += -DEXTRAKEY_ENABLE
41endif
42
43ifdef CONSOLE_ENABLE
44 $(error Not Supported)
45 OPT_DEFS += -DCONSOLE_ENABLE
46else
47 OPT_DEFS += -DNO_PRINT
48 OPT_DEFS += -DNO_DEBUG
49endif
50
51ifdef COMMAND_ENABLE
52 $(error Not Supported)
53 SRC += common/command.c
54 OPT_DEFS += -DCOMMAND_ENABLE
55endif
56
57ifdef NKRO_ENABLE
58 $(error Not Supported)
59 OPT_DEFS += -DNKRO_ENABLE
60endif
61
62ifdef SLEEP_LED_ENABLE
63 $(error Not Supported)
64 SRC += common/sleep_led.c
65 OPT_DEFS += -DSLEEP_LED_ENABLE
66 OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
67endif
68
69ifdef BACKLIGHT_ENABLE
70 $(error Not Supported)
71 SRC += common/backlight.c
72 OPT_DEFS += -DBACKLIGHT_ENABLE
73endif
74
75ifdef KEYMAP_SECTION_ENABLE
76 $(error Not Supported)
77 OPT_DEFS += -DKEYMAP_SECTION_ENABLE
78 EXTRALDFLAGS = -Wl,-L$(TOP_DIR),-Tldscript_keymap_avr5.x
79endif