git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ..
#curl -L -O "https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.zip"
#unzip -q boost_1_64_0.zip
cd boost_1_64_0
./bootstrap.sh
./b2 toolset=emscripten link=static runtime-link=static --with-date_time
export BOOST_INCL=`pwd`
export BOOST_LIB=`pwd`/stage/lib
cd ..
mkdir -p anypiab/build
cd anypiab/build
emcmake cmake -DBOOST_INCLUDEDIR=$BOOST_INCL -DBOOST_LIBRARYDIR=$BOOST_LIB ..
make
cd ../..
mkdir -p anypiajs/build
cd anypiajs/build
emcmake cmake -DBOOST_INCLUDEDIR=$BOOST_INCL -DBOOST_LIBRARYDIR=$BOOST_LIB ..
make