#!/bin/sh
set -e

OPTIONS="HAVE_READLINE=no"

if [ "$config_build_pic" = yes ]; then
    OPTIONS="$OPTIONS XCFLAGS=-fPIC"
fi
if [ "$config_build_host" ]; then
    OPTIONS="$OPTIONS CC=$config_build_host-gcc"
fi

set -x
make -C "$config_mujs_source" install-static prefix="$config_local_prefix" $OPTIONS "$@"
