From 04b3fcb479f5aaae06d18b315a8bdc8c298f4eae Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 5 Aug 2025 11:28:41 +0200 Subject: removed clustering --- build/dependencies.mk | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 build/dependencies.mk (limited to 'build/dependencies.mk') diff --git a/build/dependencies.mk b/build/dependencies.mk new file mode 100644 index 0000000..fa10af4 --- /dev/null +++ b/build/dependencies.mk @@ -0,0 +1,52 @@ +# Dependency management for GlaMaC +# This file contains rules for installing and managing dependencies + +# Automatic dependency generation for source files +GLAMAC_DEPS := $(GLAMAC_SRCS:.c=.d) +GLAUTILS_DEPS := $(GLAUTILS_SRCS:.c=.d) +ALL_DEPS := $(GLAMAC_DEPS) $(GLAUTILS_DEPS) + +# Include generated dependencies (suppress errors if files don't exist yet) +-include $(ALL_DEPS) + +# Rule to generate dependency files +%.d: %.c + @$(CC) -MM $(CFLAGS) $< | sed 's|\(.*\)\.o[ ]*:|\1.o \1.d:|' > $@ + +# Clean dependency files +clean-deps-files: + $(RM) $(ALL_DEPS) + +# Add dependency files to clean targets +.PHONY: clean-deps-files + +# Dependency management +deps: +ifeq ($(PLATFORM),linux) + @echo "Installing dependencies..." + sudo pacman -S --needed sdl3 git cmake pkgconf freetype2 python python-pandas python-openpyxl + @echo "Building SDL3_ttf from source..." + cd /tmp && $(RM) -rf SDL_ttf && \ + git clone https://github.com/libsdl-org/SDL_ttf.git && \ + cd SDL_ttf && git checkout release-3.2.2 && \ + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr && \ + make -C build -j$$(nproc) && sudo make -C build install && \ + sudo ldconfig + @echo "Dependencies installed!" +else + @echo "Install SDL3 development libraries manually on Windows." + @echo "Install Python with pandas and openpyxl for Excel conversion." +endif + +clean-deps: +ifeq ($(PLATFORM),linux) + @echo "Removing SDL3 dependencies..." + sudo pacman -R sdl3 --noconfirm 2>/dev/null || true + sudo $(RM) -f /usr/lib/libSDL3_ttf.so* /usr/lib/libSDL3_ttf.a /usr/lib/pkgconfig/SDL3_ttf.pc + sudo $(RMDIR) /usr/include/SDL3_ttf/ 2>/dev/null || true + sudo ldconfig + @echo "Dependencies removed!" +endif + +# Dependency-related phony targets +.PHONY: deps clean-deps \ No newline at end of file -- cgit v1.2.3