libcurl.js/client/tools/wolfssl.sh
2024-01-10 15:27:45 -05:00

28 lines
No EOL
608 B
Bash
Executable file

#!/bin/bash
#compile wolfssl for use with emscripten
set -x
set -e
CORE_COUNT=$(nproc --all)
PREFIX=$(realpath build/wolfssl-wasm)
rm -rf $PREFIX
mkdir -p $PREFIX
cd build
rm -rf wolfssl
git clone -b master --depth=1 https://github.com/wolfSSL/wolfssl wolfssl
cd wolfssl
autoreconf -fi
CFLAGS="-Os -DSP_WORD_SIZE=32" emconfigure ./configure --prefix=$PREFIX --enable-curl --enable-distro --enable-static --disable-shared --host=i686-linux --disable-examples
emmake make -j$CORE_COUNT
make install
rm -rf $PREFIX/bin
rm -rf $PREFIX/share
#rm -rf $PREFIX/lib/pkgconfig
#rm -rf $PREFIX/lib/*.la
cd ../../