#!/bin/sh

. config/options

$SCRIPTS/install ccache
$SCRIPTS/build gmp
$SCRIPTS/build ppl

setup_toolchain host

cd $BUILD/$1*

mkdir -p objdir
cd objdir

LDFLAGS="-Wl,-rpath,$ROOT/$TOOLCHAIN/lib" \
../configure --host=$HOST_NAME \
             --build=$HOST_NAME \
             --target=$TARGET_NAME \
             --prefix=$ROOT/$TOOLCHAIN \
             --enable-shared \
             --disable-static \
             --with-bits=gmp \
             --with-gmp="$ROOT/$TOOLCHAIN" \
             --with-ppl="$ROOT/$TOOLCHAIN" \

make
make check
make install
