summaryrefslogtreecommitdiff
path: root/2d/softbody/softbody_1/build.sh
blob: e1de1bb0d3ddbcb21e584bd72f138a617fb3a8a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
filepaths=""

for file in ../../../shared_cpp/*; do 
    if [ -f "$file" ]; then 
        if [[ "$file" == *.cpp ]]; then
            filepaths+=" $file"
        fi
    fi 
done

if [ ! -d ./dist ]; then
    mkdir ./dist
fi

echo "$filepaths"
emcc -o dist/output.js main.cpp undamped.cpp damped.cpp $filepaths -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s FULL_ES3=1 -s WASM=1 -s NO_EXIT_RUNTIME=1 -s EXPORTED_RUNTIME_METHODS=cwrap