From c336871f5ad5e4085de5064eaff658c3c54f04c6 Mon Sep 17 00:00:00 2001 From: damachine Date: Sat, 27 Sep 2025 02:53:08 +0200 Subject: [PATCH] feat: adjust include paths after moving header files to src directory - Updated include paths in source files to reflect new header file locations. - Moved header files from include/ to src/ directory for better organization. - Ensured all source files include headers using relative paths. - Verified successful compilation after changes. - No changes to functionality, only code organization. - This commit improves project structure and maintainability. --- Makefile | 3 +-- src/config.c | 4 ++-- {include => src}/config.h | 0 src/coolercontrol.c | 4 ++-- {include => src}/coolercontrol.h | 0 src/display.c | 8 ++++---- {include => src}/display.h | 0 src/main.c | 8 ++++---- src/monitor.c | 6 +++--- {include => src}/monitor.h | 0 10 files changed, 16 insertions(+), 17 deletions(-) rename {include => src}/config.h (100%) rename {include => src}/coolercontrol.h (100%) rename {include => src}/display.h (100%) rename {include => src}/monitor.h (100%) diff --git a/Makefile b/Makefile index 44bda18..aa9b33b 100644 --- a/Makefile +++ b/Makefile @@ -44,14 +44,13 @@ TARGET = coolerdash # Directories SRCDIR = src -INCDIR = include OBJDIR = build BINDIR = bin # Source code files MAIN_SOURCE = $(SRCDIR)/main.c SRC_MODULES = $(SRCDIR)/config.c $(SRCDIR)/coolercontrol.c $(SRCDIR)/display.c $(SRCDIR)/monitor.c -HEADERS = $(INCDIR)/config.h $(INCDIR)/coolercontrol.h $(INCDIR)/display.h $(INCDIR)/monitor.h +HEADERS = $(SRCDIR)/config.h $(SRCDIR)/coolercontrol.h $(SRCDIR)/display.h $(SRCDIR)/monitor.h OBJECTS = $(patsubst $(SRCDIR)/%.c,$(OBJDIR)/%.o,$(SRC_MODULES)) SERVICE = etc/systemd/coolerdash.service diff --git a/src/config.c b/src/config.c index 156d1c2..1f6d75e 100644 --- a/src/config.c +++ b/src/config.c @@ -27,8 +27,8 @@ // cppcheck-suppress-end missingIncludeSystem // Include project headers -#include "../include/config.h" -#include "../include/coolercontrol.h" +#include "config.h" +#include "coolercontrol.h" /** * @brief Global logging implementation for all modules except main.c diff --git a/include/config.h b/src/config.h similarity index 100% rename from include/config.h rename to src/config.h diff --git a/src/coolercontrol.c b/src/coolercontrol.c index eb43068..4e82153 100644 --- a/src/coolercontrol.c +++ b/src/coolercontrol.c @@ -30,8 +30,8 @@ // cppcheck-suppress-end missingIncludeSystem // Include project headers -#include "../include/config.h" -#include "../include/coolercontrol.h" +#include "config.h" +#include "coolercontrol.h" /** * @brief Secure string copy with bounds checking. diff --git a/include/coolercontrol.h b/src/coolercontrol.h similarity index 100% rename from include/coolercontrol.h rename to src/coolercontrol.h diff --git a/src/display.c b/src/display.c index be6d511..87e971c 100644 --- a/src/display.c +++ b/src/display.c @@ -30,10 +30,10 @@ // cppcheck-suppress-end missingIncludeSystem // Include project headers -#include "../include/config.h" -#include "../include/display.h" -#include "../include/coolercontrol.h" -#include "../include/monitor.h" +#include "config.h" +#include "display.h" +#include "coolercontrol.h" +#include "monitor.h" /** * @brief Convert color component to cairo format. diff --git a/include/display.h b/src/display.h similarity index 100% rename from include/display.h rename to src/display.h diff --git a/src/main.c b/src/main.c index 8ae29ce..641dbb5 100644 --- a/src/main.c +++ b/src/main.c @@ -36,10 +36,10 @@ // cppcheck-suppress-end missingIncludeSystem // Include project headers -#include "../include/config.h" -#include "../include/coolercontrol.h" -#include "../include/display.h" -#include "../include/monitor.h" +#include "config.h" +#include "coolercontrol.h" +#include "display.h" +#include "monitor.h" // Security and performance constants #define DEFAULT_VERSION "unknown" diff --git a/src/monitor.c b/src/monitor.c index c9c93dd..9ad3d4f 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -25,9 +25,9 @@ // cppcheck-suppress-end missingIncludeSystem // Include project headers -#include "../include/config.h" -#include "../include/monitor.h" -#include "../include/coolercontrol.h" +#include "config.h" +#include "monitor.h" +#include "coolercontrol.h" /** * @brief Extract temperature from device status history diff --git a/include/monitor.h b/src/monitor.h similarity index 100% rename from include/monitor.h rename to src/monitor.h