summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-10-21 00:41:45 +1100
committerGitHub <noreply@github.com>2022-10-20 14:41:45 +0100
commitaf678521c1d786fe5578f82c2f671f5553b08dfe (patch)
treebff4e343a67e15381b12c87ad98ac36db05cb2b0
parent0b41c13509b5547028f141d869e10199566a1228 (diff)
Remove quantum/audio from global VPATH (#18753)
-rw-r--r--builddefs/common_features.mk1
-rw-r--r--keyboards/lfkeyboards/lfk78/lfk78.c5
-rw-r--r--keyboards/lfkeyboards/lighting.c1
-rw-r--r--paths.mk1
-rw-r--r--quantum/config_common.h4
-rw-r--r--quantum/unicode/unicode.c5
6 files changed, 12 insertions, 5 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 7f07be5144..8814d8b0f9 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -64,6 +64,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_DRIVER_PWM
endif
OPT_DEFS += -DAUDIO_ENABLE
+ COMMON_VPATH += $(QUANTUM_PATH)/audio
MUSIC_ENABLE = yes
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c
index 54a2b45840..6f61d6e2e2 100644
--- a/keyboards/lfkeyboards/lfk78/lfk78.c
+++ b/keyboards/lfkeyboards/lfk78/lfk78.c
@@ -2,11 +2,14 @@
#include <avr/timer_avr.h>
#include <avr/wdt.h>
-#include "audio.h"
#include "issi.h"
#include "TWIlib.h"
#include "lighting.h"
+#ifdef AUDIO_ENABLE
+# include "audio.h"
+#endif
+
uint16_t click_hz = CLICK_HZ;
uint16_t click_time = CLICK_MS;
uint8_t click_toggle = CLICK_ENABLED;
diff --git a/keyboards/lfkeyboards/lighting.c b/keyboards/lfkeyboards/lighting.c
index dcc5c40234..f4940ec079 100644
--- a/keyboards/lfkeyboards/lighting.c
+++ b/keyboards/lfkeyboards/lighting.c
@@ -11,7 +11,6 @@
#include "lighting.h"
#include "debug.h"
#include "rgblight.h"
-#include "audio.h"
extern rgblight_config_t rgblight_config; // Declared in rgblight.c
diff --git a/paths.mk b/paths.mk
index 85ccfa0796..99df2e9d6e 100644
--- a/paths.mk
+++ b/paths.mk
@@ -27,7 +27,6 @@ COMMON_VPATH := $(TOP_DIR)
COMMON_VPATH += $(TMK_PATH)
COMMON_VPATH += $(QUANTUM_PATH)
COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
-COMMON_VPATH += $(QUANTUM_PATH)/audio
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
COMMON_VPATH += $(QUANTUM_PATH)/sequencer
COMMON_VPATH += $(DRIVER_PATH)
diff --git a/quantum/config_common.h b/quantum/config_common.h
index d93477b27e..6ab8a2aa7d 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -24,4 +24,6 @@
#define COL2ROW 0
#define ROW2COL 1
-#include "song_list.h"
+#ifdef AUDIO_ENABLE
+# include "song_list.h"
+#endif
diff --git a/quantum/unicode/unicode.c b/quantum/unicode/unicode.c
index 3f934c9277..e2bfd68a3a 100644
--- a/quantum/unicode/unicode.c
+++ b/quantum/unicode/unicode.c
@@ -23,10 +23,13 @@
#include "host.h"
#include "keycode.h"
#include "wait.h"
-#include "audio.h"
#include "send_string.h"
#include "utf8.h"
+#if defined(AUDIO_ENABLE)
+# include "audio.h"
+#endif
+
#if defined(UNICODE_ENABLE) + defined(UNICODEMAP_ENABLE) + defined(UCIS_ENABLE) > 1
# error "Cannot enable more than one Unicode method (UNICODE, UNICODEMAP, UCIS) at the same time"
#endif