From caedec92d2c22480313c43a364408fb920c55364 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 7 Jul 2016 14:42:16 +0300 Subject: [PATCH] Move the visualizer_user file to keymap folder Also rename it to visualizer.c --- .../default/visualizer.c} | 0 quantum/visualizer/visualizer.mk | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) rename keyboards/infinity_ergodox/{visualizer_user.c => keymaps/default/visualizer.c} (100%) diff --git a/keyboards/infinity_ergodox/visualizer_user.c b/keyboards/infinity_ergodox/keymaps/default/visualizer.c similarity index 100% rename from keyboards/infinity_ergodox/visualizer_user.c rename to keyboards/infinity_ergodox/keymaps/default/visualizer.c diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk index 449957d63fc..2f4a41d66f9 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