aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rw-r--r--tmk_core/common.mk9
2 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cfbe0e994..7c00ce2cc 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,12 @@ ifndef KEYBOARD
59 KEYBOARD=planck 59 KEYBOARD=planck
60endif 60endif
61 61
62MASTER ?= left
63ifdef master
64 MASTER = $(master)
65endif
66
67
62# converts things to keyboards/subproject 68# converts things to keyboards/subproject
63ifneq (,$(findstring /,$(KEYBOARD))) 69ifneq (,$(findstring /,$(KEYBOARD)))
64 TEMP:=$(KEYBOARD) 70 TEMP:=$(KEYBOARD)
@@ -212,6 +218,14 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
212 VAPTH += $(SERIAL_PATH) 218 VAPTH += $(SERIAL_PATH)
213endif 219endif
214 220
221ifeq ($(MASTER),right)
222 OPT_DEFS += -DMASTER_IS_ON_RIGHT
223else
224 ifneq ($(MASTER),left)
225$(error MASTER does not have a valid value(left/right))
226 endif
227endif
228
215# Optimize size but this may cause error "relocation truncated to fit" 229# Optimize size but this may cause error "relocation truncated to fit"
216#EXTRALDFLAGS = -Wl,--relax 230#EXTRALDFLAGS = -Wl,--relax
217 231
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index d71fba9bc..5bae0d762 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -97,6 +97,15 @@ ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
97 endif 97 endif
98endif 98endif
99 99
100ifeq ($(MASTER),right)
101 OPT_DEFS += -DMASTER_IS_ON_RIGHT
102else
103 ifneq ($(MASTER),left)
104$(error MASTER does not have a valid value(left/right))
105 endif
106endif
107
108
100# Version string 109# Version string
101OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null) 110OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null)
102 111