From e1847d5d67d2521a370ef84e60870668013dbfa5 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Wed, 11 Sep 2024 01:15:19 -0400 Subject: [PATCH] Setting up changes for new unigi --- .clangd | 2 ++ .gitmodules | 10 ++-------- Makefile | 15 ++++++++++++--- haloo3d | 2 +- maze.c | 3 +-- unigi | 1 + unigi.platform.sdl1 | 1 + unigi/pullall.sh | 10 ---------- unigi/unigi | 1 - unigi/unigi.ext | 1 - unigi/unigi.headers | 1 - unigi/unigi.platform.sdl1 | 1 - 12 files changed, 20 insertions(+), 28 deletions(-) create mode 100644 .clangd create mode 160000 unigi create mode 160000 unigi.platform.sdl1 delete mode 100644 unigi/pullall.sh delete mode 160000 unigi/unigi delete mode 160000 unigi/unigi.ext delete mode 160000 unigi/unigi.headers delete mode 160000 unigi/unigi.platform.sdl1 diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..12be32b --- /dev/null +++ b/.clangd @@ -0,0 +1,2 @@ +CompileFlags: # Tweak the parse settings + Add: [-Iunigi/] diff --git a/.gitmodules b/.gitmodules index b7d4373..354e146 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,14 +2,8 @@ path = haloo3d url = https://github.com/randomouscrap98/haloo3d.git [submodule "unigi/unigi"] - path = unigi/unigi + path = unigi url = https://git.lumen.sh/Fierelier/unigi.git -[submodule "unigi/unigi.headers"] - path = unigi/unigi.headers - url = https://git.lumen.sh/Fierelier/unigi.headers.git -[submodule "unigi/unigi.ext"] - path = unigi/unigi.ext - url = https://git.lumen.sh/Fierelier/unigi.ext [submodule "unigi/unigi.platform.sdl1"] - path = unigi/unigi.platform.sdl1 + path = unigi.platform.sdl1 url = https://git.lumen.sh/Fierelier/unigi.platform.sdl1.git diff --git a/Makefile b/Makefile index 819ca86..c2cb5be 100644 --- a/Makefile +++ b/Makefile @@ -21,24 +21,33 @@ else endif HALOOLIB = haloo3d/build/haloo3d_full.a +UNIGILIBDIR = unigi.platform.sdl1 +UNIGILIB = unigi.platform.sdl1.o .PHONY: clean .PHONY: full +.PHONY: unigi full: - echo "Please specify a sample to build (ends with .exe)" + @echo "Please specify a sample to build (ends with .exe)" $(HALOOLIB): cd haloo3d && $(MAKE) full +$(UNIGILIB): $(UNIGILIBDIR)/main.c + $(CC) $(CFLAGS) -c $< -o $@ + +unigi: $(UNIGILIB) + @echo "Built unigi!" + # Rule to build .o files in main folder $(BUILDD)/%.o: %.c %.h mkdir -p $(BUILDD) $(CC) $(CFLAGS) -c $< -o $@ # Rule to build any sample. We ALWAYS need math so... link it -%.exe: %.o $(HALOOLIB) - $(CC) $(CFLAGS) $< $(HALOOLIB) -o $@ -lm -lSDL +%.exe: %.o $(HALOOLIB) $(UNIGILIB) + $(CC) $(CFLAGS) $^ -o $@ -lm -lSDL # Rule to clean the build files clean: diff --git a/haloo3d b/haloo3d index 9fbc094..a07b4de 160000 --- a/haloo3d +++ b/haloo3d @@ -1 +1 @@ -Subproject commit 9fbc0948f182cd46c4aaff43b632f92f72fb4fb2 +Subproject commit a07b4de2e0753440f0fc664f717e9bc5f46193b9 diff --git a/maze.c b/maze.c index 410a081..9fb3102 100644 --- a/maze.c +++ b/maze.c @@ -6,8 +6,7 @@ #include "haloo3d/haloo3dex_obj.h" #include "haloo3d/haloo3dex_print.h" -#include "unigi/unigi.headers/src/main.h" -#include "unigi/unigi.platform.sdl1/src/main.c" +#include "unigi/main.h" #include "ecs2.h" #include "keys.h" diff --git a/unigi b/unigi new file mode 160000 index 0000000..b7bb4c4 --- /dev/null +++ b/unigi @@ -0,0 +1 @@ +Subproject commit b7bb4c428b1b5776b58b33be89057bf66082dfa2 diff --git a/unigi.platform.sdl1 b/unigi.platform.sdl1 new file mode 160000 index 0000000..e6443ef --- /dev/null +++ b/unigi.platform.sdl1 @@ -0,0 +1 @@ +Subproject commit e6443ef40a27de8e305eda755f43299eb1c6b651 diff --git a/unigi/pullall.sh b/unigi/pullall.sh deleted file mode 100644 index 2d29ebc..0000000 --- a/unigi/pullall.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -cd unigi -git pull -cd ../unigi.headers -git pull -cd ../unigi.ext -git pull -cd ../unigi.platform.sdl1 -git pull diff --git a/unigi/unigi b/unigi/unigi deleted file mode 160000 index 34aa7f0..0000000 --- a/unigi/unigi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 34aa7f0a1cd24939c2de879b5dcce03daa0c7de2 diff --git a/unigi/unigi.ext b/unigi/unigi.ext deleted file mode 160000 index cf21dd8..0000000 --- a/unigi/unigi.ext +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cf21dd85c6d49509c946ab9f462edc2e8a73327c diff --git a/unigi/unigi.headers b/unigi/unigi.headers deleted file mode 160000 index ab07d46..0000000 --- a/unigi/unigi.headers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ab07d46aac8d7043399437b83f81ce8ce3bf1233 diff --git a/unigi/unigi.platform.sdl1 b/unigi/unigi.platform.sdl1 deleted file mode 160000 index e407020..0000000 --- a/unigi/unigi.platform.sdl1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e407020c2118d7ad2f4d43eca5214b6360a0b7cc