summaryrefslogtreecommitdiff
path: root/quantum/visualizer/visualizer.mk
diff options
context:
space:
mode:
authorJoshua Colbeck <Skrymir@users.noreply.github.com>2016-07-12 23:14:30 -0500
committerGitHub <noreply@github.com>2016-07-12 23:14:30 -0500
commit68ceffe53e299fb504bdd4733b1555a8558b472b (patch)
treeae9cc958d239374478338fee2783c203517d6762 /quantum/visualizer/visualizer.mk
parentac978a50a2f523f2de7f928a6b41ac40469911c2 (diff)
parenta998a48673372e409991066d7d2d9ba282f79d59 (diff)
Merge pull request #2 from jackhumbert/master
Pull from upstream
Diffstat (limited to 'quantum/visualizer/visualizer.mk')
-rw-r--r--quantum/visualizer/visualizer.mk36
1 files changed, 18 insertions, 18 deletions
diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk
index 56525ffd93..2f4a41d66f 100644
--- a/quantum/visualizer/visualizer.mk
+++ b/quantum/visualizer/visualizer.mk
@@ -20,41 +20,41 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-GFXLIB = $(VISUALIZER_DIR)/ugfx
SRC += $(VISUALIZER_DIR)/visualizer.c
-UINCDIR += $(GFXINC) $(VISUALIZER_DIR)
+EXTRAINCDIRS += $(GFXINC) $(VISUALIZER_DIR)
+GFXLIB = $(LIB_PATH)/ugfx
+VPATH += $(VISUALIZER_PATH)
+
+OPT_DEFS += -DVISUALIZER_ENABLE
ifdef LCD_ENABLE
-UDEFS += -DLCD_ENABLE
+OPT_DEFS += -DLCD_ENABLE
ULIBS += -lm
-USE_UGFX = yes
endif
ifdef LCD_BACKLIGHT_ENABLE
SRC += $(VISUALIZER_DIR)/lcd_backlight.c
-ifndef EMULATOR
-SRC += lcd_backlight_hal.c
-endif
-UDEFS += -DLCD_BACKLIGHT_ENABLE
+OPT_DEFS += -DLCD_BACKLIGHT_ENABLE
endif
ifdef LED_ENABLE
SRC += $(VISUALIZER_DIR)/led_test.c
-UDEFS += -DLED_ENABLE
-USE_UGFX = yes
+OPT_DEFS += -DLED_ENABLE
endif
-ifdef USE_UGFX
include $(GFXLIB)/gfx.mk
-SRC += $(GFXSRC)
-UDEFS += $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS)))
-ULIBS += $(patsubst %,-l%,$(patsubst -l%,%,$(GFXLIBS)))
-endif
+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