From cbfad2fe7bec06054a9e9b59eb98c74f6da48add Mon Sep 17 00:00:00 2001 From: 9R Date: Thu, 6 Apr 2023 21:50:14 +0200 Subject: [PATCH] use VPATH to cleanup includes --- keyboards/handwired/replicazeron/replicazeron.c | 1 - keyboards/handwired/replicazeron/replicazeron.h | 10 ++++------ keyboards/handwired/replicazeron/rules.mk | 10 ++++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/keyboards/handwired/replicazeron/replicazeron.c b/keyboards/handwired/replicazeron/replicazeron.c index 91eb2df5b99..e4e47415258 100644 --- a/keyboards/handwired/replicazeron/replicazeron.c +++ b/keyboards/handwired/replicazeron/replicazeron.c @@ -49,7 +49,6 @@ void keyboard_post_init_kb(void) { init_wasd_state(); #endif // THUMBSTICK_ENABLE - // FIXME: This was inside the thumbstick's ifdef, moved it out assuming it was a typo controller_state = init_state(); keyboard_post_init_user(); diff --git a/keyboards/handwired/replicazeron/replicazeron.h b/keyboards/handwired/replicazeron/replicazeron.h index b76107d9853..ae3090997d3 100644 --- a/keyboards/handwired/replicazeron/replicazeron.h +++ b/keyboards/handwired/replicazeron/replicazeron.h @@ -16,20 +16,18 @@ #pragma once -// FIXME: The "common/" prefixes can probably be removed using VPATH or whatever on the mk file - -#include "common/state.h" +#include "state.h" #ifdef LEDS_ENABLE -# include "common/leds.h" +# include "leds.h" #endif #ifdef OLED_ENABLE -# include "common/oled.h" +# include "oled.h" #endif #ifdef THUMBSTICK_ENABLE -# include "common/thumbstick.h" +# include "thumbstick.h" #endif enum kb_layers { diff --git a/keyboards/handwired/replicazeron/rules.mk b/keyboards/handwired/replicazeron/rules.mk index d1809549412..0d29a2be1c8 100644 --- a/keyboards/handwired/replicazeron/rules.mk +++ b/keyboards/handwired/replicazeron/rules.mk @@ -9,22 +9,24 @@ TAP_DANCE_ENABLE = no LEDS_ENABLE = yes THUMBSTICK_ENABLE = yes -SRC += common/state.c +SRC += state.c + +VPATH += keyboards/handwired/replicazeron/common # redirect compilation against "handwired/replicazeron" to the stm32 variant DEFAULT_FOLDER = handwired/replicazeron/stm32f103 ifeq ($(strip $(LEDS_ENABLE)), yes) OPT_DEFS += -DLEDS_ENABLE - SRC += common/leds.c + SRC += leds.c endif ifeq ($(strip $(OLED_ENABLE)), yes) - SRC += common/oled.c + SRC += oled.c endif ifeq ($(strip $(THUMBSTICK_ENABLE)), yes) OPT_DEFS += -DTHUMBSTICK_ENABLE SRC += analog.c \ - common/thumbstick.c + thumbstick.c endif