# Exit on error:
set -e

wget http://ftpmirror.gnu.org/make/make-4.0.tar.bz2
tar xf make-4.0.tar.bz2
cd make-4.0

CC=/static/bin/musl-gcc \
    LDFLAGS='-s -L/static/lib -static -static-libgcc' \
    ./configure --prefix=/static

make install
cd ..
rm -rf make-4.0
rm make-4.0.tar.bz2

exit 0
