#!/bin/bash

TOOLCHAIN_DIR=$HOME/stuff/openwrt/cross
PATH=$TOOLCHAIN_DIR/bin:$PATH

CONFIG_ARGS="--host=mipsel-linux --target=mipsel-linux"
CXXFLAGS=-mips32

# check where we are
test ! -e ./aclocal.m4 \
    && echo "Should be called from the root of an ariba build tree." \
    && exit

# setup
export PREFIX=`cd ./build; pwd`

./configure --prefix=$PREFIX --with-boost=$PREFIX CPPFLAGS=-I$PREFIX/include LDFLAGS="-L$PREFIX/lib -lapr-1 -lexpat -laprutil-1 -llog4cxx" $CONFIG_ARGS
#make && make install

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib
