summaryrefslogtreecommitdiffstats
path: root/quantum/visualizer/visualizer.mk
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/visualizer/visualizer.mk')
-rw-r--r--quantum/visualizer/visualizer.mk28
1 files changed, 24 insertions, 4 deletions
diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk
index 13c5d31587..56525ffd93 100644
--- a/quantum/visualizer/visualizer.mk
+++ b/quantum/visualizer/visualizer.mk
@@ -21,21 +21,41 @@
# SOFTWARE.
GFXLIB = $(VISUALIZER_DIR)/ugfx
+SRC += $(VISUALIZER_DIR)/visualizer.c
+UINCDIR += $(GFXINC) $(VISUALIZER_DIR)
+
ifdef LCD_ENABLE
-include $(GFXLIB)/gfx.mk
UDEFS += -DLCD_ENABLE
ULIBS += -lm
+USE_UGFX = yes
endif
-SRC += $(GFXSRC) $(VISUALIZER_DIR)/visualizer.c
-UINCDIR += $(GFXINC) $(VISUALIZER_DIR)
ifdef LCD_BACKLIGHT_ENABLE
SRC += $(VISUALIZER_DIR)/lcd_backlight.c
+ifndef EMULATOR
SRC += lcd_backlight_hal.c
+endif
UDEFS += -DLCD_BACKLIGHT_ENABLE
endif
+ifdef LED_ENABLE
+SRC += $(VISUALIZER_DIR)/led_test.c
+UDEFS += -DLED_ENABLE
+USE_UGFX = yes
+endif
+
+ifdef USE_UGFX
+include $(GFXLIB)/gfx.mk
+SRC += $(GFXSRC)
+UDEFS += $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS)))
+ULIBS += $(patsubst %,-l%,$(patsubst -l%,%,$(GFXLIBS)))
+endif
+
ifndef VISUALIZER_USER
VISUALIZER_USER = visualizer_user.c
endif
-SRC += $(VISUALIZER_USER) \ No newline at end of file
+SRC += $(VISUALIZER_USER)
+
+ifdef EMULATOR
+UINCDIR += $(TMK_DIR)/common
+endif \ No newline at end of file