changed how building is triggered, now there is a [twn] shell script that is exptected to be in PATH. also physfs and libxm cmake targets no longer recompiled per every target, but shared

This commit is contained in:
2024-09-25 19:51:39 +03:00
parent a500fcd97c
commit 4c9278a927
8 changed files with 21 additions and 25 deletions

7
tools/build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/env sh
if [ "$1" = "web" ]; then
emcmake cmake -B .build-web "${@:2}" && cmake --build .build-web
else
cmake -B .build "$@" && cmake --build .build
fi

15
tools/twn Executable file
View File

@ -0,0 +1,15 @@
#!/bin/env sh
# townengine tooling interface
set +e
toolpath="$(dirname -- "${BASH_SOURCE[0]}")"
export TWNROOT=$(realpath "$toolpath"/../)
export TWNBUILDDIR=$(realpath "$toolpath"/../.build)
case "$1" in
build ) "$toolpath"/build.sh
;;
* ) echo "Unknown command."
;;
esac