From f5c89416527a3ec435ed49137fd2bf4af216024c Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 Aug 2016 23:25:39 +0300 Subject: [PATCH] UGFX is compiled once per keyboard instead of keymap --- build_keyboard.mk | 8 ++++---- .../infinity/drivers/gdisp/st7565ergodox/board_ST7565.h | 2 -- quantum/visualizer/visualizer.mk | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/build_keyboard.mk b/build_keyboard.mk index 82464d58..ad92892e 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -258,12 +258,12 @@ endif OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) -$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" +$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) -$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) -$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) -$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) +$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC) +$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(GFXDEFS) +$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC) $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) # Default target. diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h index 290571ce..abda0bd8 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h +++ b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h @@ -8,8 +8,6 @@ #ifndef _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H -#include "print.h" - #define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6 #define ST7565_ADC ST7565_ADC_NORMAL #define ST7565_COM_SCAN ST7565_COM_SCAN_DEC diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk index ecdeba1e..8f5fb893 100644 --- a/quantum/visualizer/visualizer.mk +++ b/quantum/visualizer/visualizer.mk @@ -43,8 +43,8 @@ OPT_DEFS += -DLED_ENABLE endif include $(GFXLIB)/gfx.mk -SRC += $(patsubst $(TOP_DIR)/%,%,$(GFXSRC)) -OPT_DEFS += $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS))) +GFXSRC := $(patsubst $(TOP_DIR)/%,%,$(GFXSRC)) +GFXDEFS := $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS))) ifneq ("$(wildcard $(KEYMAP_PATH)/visualizer.c)","") SRC += keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/visualizer.c