diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2016-07-06 15:36:45 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2016-07-06 16:06:53 +0300 |
| commit | e5726b017a9de2922ea923818c6e215600f68a85 (patch) | |
| tree | 2d1470d076017af6d089a00f4bb317abdb331346 | |
| parent | 4b45deb652045aac73e5fdd7412a73bcef19c0c8 (diff) | |
| download | qmk_firmware-e5726b017a9de2922ea923818c6e215600f68a85.tar.gz qmk_firmware-e5726b017a9de2922ea923818c6e215600f68a85.zip | |
Add setting of the master side to the makefile
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | tmk_core/common.mk | 9 |
2 files changed, 23 insertions, 0 deletions
| @@ -59,6 +59,12 @@ ifndef KEYBOARD | |||
| 59 | KEYBOARD=planck | 59 | KEYBOARD=planck |
| 60 | endif | 60 | endif |
| 61 | 61 | ||
| 62 | MASTER ?= left | ||
| 63 | ifdef master | ||
| 64 | MASTER = $(master) | ||
| 65 | endif | ||
| 66 | |||
| 67 | |||
| 62 | # converts things to keyboards/subproject | 68 | # converts things to keyboards/subproject |
| 63 | ifneq (,$(findstring /,$(KEYBOARD))) | 69 | ifneq (,$(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) |
| 213 | endif | 219 | endif |
| 214 | 220 | ||
| 221 | ifeq ($(MASTER),right) | ||
| 222 | OPT_DEFS += -DMASTER_IS_ON_RIGHT | ||
| 223 | else | ||
| 224 | ifneq ($(MASTER),left) | ||
| 225 | $(error MASTER does not have a valid value(left/right)) | ||
| 226 | endif | ||
| 227 | endif | ||
| 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 |
| 98 | endif | 98 | endif |
| 99 | 99 | ||
| 100 | ifeq ($(MASTER),right) | ||
| 101 | OPT_DEFS += -DMASTER_IS_ON_RIGHT | ||
| 102 | else | ||
| 103 | ifneq ($(MASTER),left) | ||
| 104 | $(error MASTER does not have a valid value(left/right)) | ||
| 105 | endif | ||
| 106 | endif | ||
| 107 | |||
| 108 | |||
| 100 | # Version string | 109 | # Version string |
| 101 | OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null) | 110 | OPT_DEFS += -DVERSION=$(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null) |
| 102 | 111 | ||
