From e5726b017a9de2922ea923818c6e215600f68a85 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Wed, 6 Jul 2016 15:36:45 +0300 Subject: Add setting of the master side to the makefile --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cfbe0e994d..7c00ce2cc8 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,12 @@ ifndef KEYBOARD KEYBOARD=planck endif +MASTER ?= left +ifdef master + MASTER = $(master) +endif + + # converts things to keyboards/subproject ifneq (,$(findstring /,$(KEYBOARD))) TEMP:=$(KEYBOARD) @@ -212,6 +218,14 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) VAPTH += $(SERIAL_PATH) endif +ifeq ($(MASTER),right) + OPT_DEFS += -DMASTER_IS_ON_RIGHT +else + ifneq ($(MASTER),left) +$(error MASTER does not have a valid value(left/right)) + endif +endif + # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax -- cgit v1.2.3