Skip to content

Latest commit

 

History

History
executable file
·
52 lines (40 loc) · 1.08 KB

buildbot-emscripten.sh

File metadata and controls

executable file
·
52 lines (40 loc) · 1.08 KB
 
1
2
3
#!/bin/bash
if [ -z "$SDKDIR" ]; then
May 17, 2020
May 17, 2020
4
SDKDIR="/emsdk"
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
fi
ENVSCRIPT="$SDKDIR/emsdk_env.sh"
if [ ! -f "$ENVSCRIPT" ]; then
echo "ERROR: This script expects the Emscripten SDK to be in '$SDKDIR'." 1>&2
echo "ERROR: Set the \$SDKDIR environment variable to override this." 1>&2
exit 1
fi
TARBALL="$1"
if [ -z $1 ]; then
TARBALL=physfs-emscripten.tar.xz
fi
cd `dirname "$0"`
cd ..
PHYSFSBASE=`pwd`
echo "Setting up Emscripten SDK environment..."
source "$ENVSCRIPT"
echo "Setting up..."
cd "$PHYSFSBASE"
rm -rf buildbot
mkdir buildbot
cd buildbot
echo "Configuring..."
May 12, 2020
May 12, 2020
33
emcmake cmake -G "Ninja" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?
May 12, 2020
May 12, 2020
36
emmake cmake --build . --config MinSizeRel || exit $?
Jul 9, 2017
Jul 9, 2017
38
set -e
39
40
41
rm -rf "$TARBALL" physfs-emscripten
mkdir -p physfs-emscripten
echo "Archiving to '$TARBALL' ..."
Jul 9, 2017
Jul 9, 2017
42
43
44
45
46
cp ../src/physfs.h libphysfs.a physfs-emscripten
chmod -R a+r physfs-emscripten
chmod a+x physfs-emscripten
chmod -R go-w physfs-emscripten
tar -cJvvf "$TARBALL" physfs-emscripten
47
48
49
50
51
echo "Done."
exit 0
# end of emscripten-buildbot.sh ...