diff options
author | Sven Göthel <[email protected]> | 2024-08-08 14:50:43 +0200 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-08-08 14:50:43 +0200 |
commit | dbd631b893650fff4bade772d4c6b5f77d9236c5 (patch) | |
tree | d3c759dc1602ccfd98f97e9e01f02d1f28b5c3df /scripts/setup-emscripten.sh | |
parent | e304df475dd8741c7126b1a7564c71ed7f8dd015 (diff) |
scripts: Add build-wasm.sh
Diffstat (limited to 'scripts/setup-emscripten.sh')
-rwxr-xr-x | scripts/setup-emscripten.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/setup-emscripten.sh b/scripts/setup-emscripten.sh new file mode 100755 index 0000000..85b6229 --- /dev/null +++ b/scripts/setup-emscripten.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# set -x + +if [ -z "$EMSDK" ] ; then + echo "WARNING: EMSDK unset, trying to use system-default with EM_CONFIG ~/.emscripten (not recommended)" + echo "WARNING: Consider installing emscripten upstream and setup environment via ~/emsdk/emsdk_env.sh" + export EM_CONFIG=$HOME/.emscripten +else + echo "INFO: EMSDK set (recommended), using it" +fi + +# RECOMMENDED +# emsdk_root=`readlink -f $HOME/emsdk` +# echo "Using EMSDK ${emsdk_root}" +# . ${emsdk_root}/emsdk_env.sh + +# NOT RECOMMENDED +# export EM_CONFIG=$HOME/.emscripten + +# Generate config, clear cach and/or ports +# emcc --generate-config +# emcc --clear-cache +# emcc --clear-ports +# + |