diff --git a/vendor/box3d/lib/linux-amd64/libbox3d.a b/vendor/box3d/lib/linux-amd64/libbox3d.a index 402424fa2..42e9a56cd 100644 --- a/vendor/box3d/lib/linux-amd64/libbox3d.a +++ b/vendor/box3d/lib/linux-amd64/libbox3d.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d698fbbe655db1d1ec6f52dcc23bfed4a2c981fa88040ba449f9f83609edba88 -size 3137140 +oid sha256:ad5491b77cda430ee03adb68bd6b4d56d3f7d8941327643eecc2b636496acda0 +size 1601114 diff --git a/vendor/box3d/src/build.sh b/vendor/box3d/src/build.sh index 60cfd41f1..0513d8ea5 100755 --- a/vendor/box3d/src/build.sh +++ b/vendor/box3d/src/build.sh @@ -70,12 +70,19 @@ Darwin) ;; Linux) LIB_DIR="../lib/linux-$ARCH" - mkdir -p "$LIB_DIR" - $cc -c -O2 -std=c17 -fPIC -Iinclude src/*.c - $ar rcs "$LIB_DIR/$LIB_NAME" ./*.o - rm ./*.o + mkdir -p "$LIB_DIR" build + for src in src/*.c; do + obj="build/$(basename "${src%.c}.o")" + $cc -c -O2 -std=c17 -fPIC -Iinclude "$src" -o "$obj" + done + # Clean up old library in case `ar` is tempted to preserve old symbols + rm -f "$LIB_DIR/$LIB_NAME" + $ar rcs "$LIB_DIR/$LIB_NAME" build/*.o + $ranlib "$LIB_DIR/$LIB_NAME" + rm -rf build ;; *) + echo "Error: Unsupported operating system: $(uname -s)" exit 1 ;;