summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f8c945045c..e93528600d 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)\"