summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-07-07 13:42:16 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-07-07 13:42:16 +0200
commitcaedec92d2c22480313c43a364408fb920c55364 (patch)
tree907f654858c926a0260ca180020a7e26c71f9a45
parentaaac254ebce2005272e7385488b5690bbbe6d7c8 (diff)
downloadqmk_firmware-caedec92d2c22480313c43a364408fb920c55364.tar.gz
qmk_firmware-caedec92d2c22480313c43a364408fb920c55364.tar.xz
Move the visualizer_user file to keymap folder
Also rename it to visualizer.c
-rw-r--r--keyboards/infinity_ergodox/keymaps/default/visualizer.c (renamed from keyboards/infinity_ergodox/visualizer_user.c)0
-rw-r--r--quantum/visualizer/visualizer.mk11
2 files changed, 8 insertions, 3 deletions
diff --git a/keyboards/infinity_ergodox/visualizer_user.c b/keyboards/infinity_ergodox/keymaps/default/visualizer.c
index c0d335ce6..c0d335ce6 100644
--- a/keyboards/infinity_ergodox/visualizer_user.c
+++ b/keyboards/infinity_ergodox/keymaps/default/visualizer.c
diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk
index 449957d63..2f4a41d66 100644
--- a/quantum/visualizer/visualizer.mk
+++ b/quantum/visualizer/visualizer.mk
@@ -46,10 +46,15 @@ include $(GFXLIB)/gfx.mk
SRC += $(patsubst $(TOP_DIR)/%,%,$(GFXSRC))
OPT_DEFS += $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS)))
-ifndef VISUALIZER_USER
-VISUALIZER_USER = visualizer_user.c
+ifneq ("$(wildcard $(KEYMAP_PATH)/visualizer.c)","")
+ SRC += keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/visualizer.c
+else
+ ifeq ("$(wildcard $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)/visualizer.c)","")
+$(error "$(KEYMAP_PATH)/visualizer.c" does not exist)
+ else
+ SRC += keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/$(KEYMAP)/visualizer.c
+ endif
endif
-SRC += $(VISUALIZER_USER)
ifdef EMULATOR
UINCDIR += $(TMK_DIR)/common