#!/bin/sh

. config/options

cd $BUILD/$1*

mkdir -p objdir-host
cd objdir-host
do_configure host \
            --enable-ipv6=no \
            --without-python \
            --with-zlib
make
make_install toolchain
sed -i "s:\(['= ]\)/usr:\\1$ROOT/$TOOLCHAIN:g" .install/usr/bin/xml2-config
cd ..

mkdir -p objdir-target
cd objdir-target
do_configure target \
            --enable-ipv6=no \
            --without-python \
            --with-zlib
make
make_install
sed -i "s:\(['= ]\)/usr:\\1$LIB_PREFIX:g" .install/usr/bin/xml2-config
