Build work

This commit is contained in:
Synthasmagoria 2026-08-30 21:45:16 +02:00
commit 94e9860a25
4 changed files with 86 additions and 84 deletions

View file

@ -1,12 +1,16 @@
#!/bin/bash -eu
ASSETS_DIR="src/assets"
RAYLIB_PATH="src/libraries/raylib"
EMSCRIPTEN_SDK_DIR="$HOME/programs/emsdk"
OUT_DIR="build/web"
if [[ -v 1 ]]; then
if [ "$1" = "DEBUG" ]; then
ODIN_FLAGS="-debug"
elif [ "$1" = "RELEASE" ]; then
ODIN_FLAGS="-no-bounds-check -disable-assert -o:size -extra-linker-flags:\"-Wl,--gc-sections,-s\""
elif [ "$1" = "TEST" ]; then
ODIN_FLAGS="-o:minimal -extra-linker-flags:\"-Wl,--gc-sections,-s\""
# unsure if this will work
ODIN_FLAGS="-o:size"
else
echo "Usage: <script> <DEBUG/RELEASE>"
exit 1
@ -16,11 +20,7 @@ else
exit 1
fi
RAYLIB_PATH="src/libraries/raylib"
EMSCRIPTEN_SDK_DIR="$HOME/programs/emsdk"
OUT_DIR="build/web"
WASM_OBJ_NAME="transformation_visulalizer.wasm.obj"
WASM_OBJ_NAME="transformation_visualizer.wasm.obj"
mkdir -p $OUT_DIR
export EMSDK_QUIET=1