summaryrefslogtreecommitdiffstats
path: root/tmk_core/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common.mk')
-rw-r--r--tmk_core/common.mk24
1 files changed, 6 insertions, 18 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 55af71ed6f..238b3c69fd 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -1,5 +1,3 @@
-PRINTF_PATH = $(LIB_PATH)/printf
-
COMMON_DIR = common
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
@@ -10,26 +8,20 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/action_macro.c \
$(COMMON_DIR)/action_layer.c \
$(COMMON_DIR)/action_util.c \
- $(COMMON_DIR)/print.c \
$(COMMON_DIR)/debug.c \
$(COMMON_DIR)/sendchar_null.c \
$(COMMON_DIR)/eeconfig.c \
$(COMMON_DIR)/report.c \
$(PLATFORM_COMMON_DIR)/suspend.c \
$(PLATFORM_COMMON_DIR)/timer.c \
+ $(COMMON_DIR)/sync_timer.c \
$(PLATFORM_COMMON_DIR)/bootloader.c \
-ifeq ($(PLATFORM),AVR)
- TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
-else ifeq ($(PLATFORM),CHIBIOS)
- TMK_COMMON_SRC += $(PRINTF_PATH)/printf.c
- TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT
- TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL
- TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG
- TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T
- VPATH += $(PRINTF_PATH)
-else ifeq ($(PLATFORM),ARM_ATSAM)
- TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
+# Use platform provided print - fall back to lib/printf
+ifneq ("$(wildcard $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk)","")
+ include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk
+else
+ include $(TMK_PATH)/$(COMMON_DIR)/lib_printf.mk
endif
# Option modules
@@ -66,10 +58,6 @@ ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
endif
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
- TMK_COMMON_SRC += $(COMMON_DIR)/mousekey.c
- TMK_COMMON_DEFS += -DMOUSEKEY_ENABLE
- TMK_COMMON_DEFS += -DMOUSE_ENABLE
-
ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
TMK_COMMON_DEFS += -DMOUSE_SHARED_EP
SHARED_EP_ENABLE = yes