X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon.mk;h=9c3425b41bbb0e445124c88759128b797b778731;hb=3e8289b53ce929484651fc065fb5f718e4e3ae21;hp=14951ec8517e884163d0a154ecce360d3ed460b8;hpb=34f376868e97c017628dc7513f5bac5fcb1ee00e;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 14951ec8..9c3425b4 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -50,10 +50,22 @@ endif ifeq (yes,$(strip $(CONSOLE_ENABLE))) OPT_DEFS += -DCONSOLE_ENABLE else - OPT_DEFS += -DNO_PRINT + # Remove print functions when console is disabled and + # no other print method like UART is available + ifneq (yes, $(strip $(DEBUG_PRINT_AVAILABLE))) + OPT_DEFS += -DNO_PRINT + OPT_DEFS += -DNO_DEBUG + endif +endif + +ifeq (yes,$(strip $(NO_DEBUG))) OPT_DEFS += -DNO_DEBUG endif +ifeq (yes,$(strip $(NO_PRINT))) + OPT_DEFS += -DNO_PRINT +endif + ifeq (yes,$(strip $(COMMAND_ENABLE))) SRC += $(COMMON_DIR)/command.c OPT_DEFS += -DCOMMAND_ENABLE @@ -89,14 +101,16 @@ ifeq (yes,$(strip $(KEYMAP_SECTION_ENABLE))) EXTRALDFLAGS = -Wl,-L$(TMK_DIR),-Tldscript_keymap_avr35.x else ifeq ($(strip $(MCU)),atmega32u4) EXTRALDFLAGS = -Wl,-L$(TMK_DIR),-Tldscript_keymap_avr5.x + else ifeq ($(strip $(MCU)),at90usb1286) + EXTRALDFLAGS = -Wl,-L$(TMK_DIR),-Tldscript_keymap_avr51.x else EXTRALDFLAGS = $(error no ldscript for keymap section) endif endif # Version string -VERSION := $(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null) -OPT_DEFS += -DVERSION=$(VERSION) +TMK_VERSION := $(shell (git describe --always --dirty=+ || echo 'unknown') 2> /dev/null) +OPT_DEFS += -DTMK_VERSION=$(TMK_VERSION) # Search Path