summaryrefslogtreecommitdiffstats
path: root/tmk_core/common.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-05-04 07:19:51 +0100
committerGitHub <noreply@github.com>2020-05-03 23:19:51 -0700
commite17b55e33ad5b3dcefcf7b828ac99aeb2daeeae2 (patch)
treee6430a88e4ce4e73783f2a2f4fd4939885b1e402 /tmk_core/common.mk
parentf31bf1b2025ece2d61cec10293cbd4e18b537eeb (diff)
Fix conflicting types for 'tfp_printf' (#8269)
* Refactor to use mpaland/printf * trim firmware size * remove keymap changes * run clang format * Fixup after rebase * fix up git-submodule command for printf
Diffstat (limited to 'tmk_core/common.mk')
-rw-r--r--tmk_core/common.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index aa8a0eb7ad..63de7c7ede 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -1,3 +1,5 @@
+PRINTF_PATH = $(LIB_PATH)/printf
+
COMMON_DIR = common
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
@@ -21,7 +23,12 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
ifeq ($(PLATFORM),AVR)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
else ifeq ($(PLATFORM),CHIBIOS)
- TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
+ 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
endif