minetest-wasm/build_libpng.sh
2022-03-30 03:04:49 +00:00

22 lines
415 B
Bash
Executable File

#!/bin/bash -eux
source common.sh
if [ ! -d sources/libpng ]; then
pushd sources
git clone https://git.code.sf.net/p/libpng/code libpng
popd
fi
pushd build
rm -rf libpng
cp -a "$SRC_DIR/libpng" libpng
pushd libpng
# For zlib
export CPPFLAGS="-I${INSTALL_DIR}/include"
export LDFLAGS="-L${INSTALL_DIR}/lib"
emconfigure ./configure --disable-shared --prefix="${INSTALL_DIR}"
emmake make
emmake make install