19 lines
436 B
Bash
19 lines
436 B
Bash
|
|
#!/bin/sh
|
||
|
|
set -e
|
||
|
|
PACKAGE=$(sed -n 's/^PACKAGE\s*=\s*//p' ../Makefile)
|
||
|
|
VERSION=$(sed -n 's/^VERSION\s*=\s*//p' ../Makefile)
|
||
|
|
(
|
||
|
|
cd ..
|
||
|
|
make dist-gzip
|
||
|
|
)
|
||
|
|
cd playground
|
||
|
|
tar xzf ../../"$PACKAGE-$VERSION".tar.gz
|
||
|
|
rm -rf dist
|
||
|
|
mv "$PACKAGE-$VERSION" dist
|
||
|
|
cd dist
|
||
|
|
emconfigure ./configure CFLAGS="-O2" LDFLAGS="-sASYNCIFY"
|
||
|
|
cd src
|
||
|
|
emmake make -j"$(nproc)" libapfl.a
|
||
|
|
cd ../..
|
||
|
|
emcc -sASYNCIFY -O3 -oplayground.js playground.c dist/src/libapfl.a
|