From 4faddd3449ca553e0d8b02ba91f9a34b534eebe7 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Jan 2016 00:06:51 -0500 Subject: [PATCH] working --- keyboard/planck/keymaps/keymap_lock.c | 2 ++ quantum/quantum.mk | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/keyboard/planck/keymaps/keymap_lock.c b/keyboard/planck/keymaps/keymap_lock.c index cc9be55f6..bc81adcf9 100644 --- a/keyboard/planck/keymaps/keymap_lock.c +++ b/keyboard/planck/keymaps/keymap_lock.c @@ -1,3 +1,5 @@ +// USING_MIDI +// USING_BACKLIGHT #include "keymap_common.h" #include "backlight.h" #include "action_layer.h" diff --git a/quantum/quantum.mk b/quantum/quantum.mk index c82e47872..62d67be9f 100644 --- a/quantum/quantum.mk +++ b/quantum/quantum.mk @@ -4,6 +4,21 @@ QUANTUM_DIR = quantum SRC += $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/led.c +ifdef KEYMAP +ifneq (,$(shell grep USING_MIDI 'keymaps/keymap_$(KEYMAP).c')) +MIDI_ENABLE=yes +$(info * Overriding MIDI_ENABLE setting - keymap_$(KEYMAP).c requires it) +endif +ifneq (,$(shell grep USING_UNICODE 'keymaps/keymap_$(KEYMAP).c')) +UNICODE_ENABLE=yes +$(info * Overriding UNICODE_ENABLE setting - keymap_$(KEYMAP).c requires it) +endif +ifneq (,$(shell grep USING_BACKLIGHT 'keymaps/keymap_$(KEYMAP).c')) +BACKLIGHT_ENABLE=yes +$(info * Overriding BACKLIGHT_ENABLE setting - keymap_$(KEYMAP).c requires it) +endif +endif + ifndef CUSTOM_MATRIX SRC += $(QUANTUM_DIR)/matrix.c endif