diff --git a/Makefile b/Makefile index f8c94504..e9352860 100644 --- a/Makefile +++ b/Makefile @@ -112,4 +112,9 @@ VPATH += $(QUANTUM_PATH)/audio include $(TMK_PATH)/protocol/lufa.mk include $(TMK_PATH)/common.mk -include $(TMK_PATH)/rules.mk \ No newline at end of file +include $(TMK_PATH)/rules.mk + +GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d") + +OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" +OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\"