#!/bin/sh
#
# Do make for the avr libc.
#
# usage: domake
#        or
#        domake install
#        or
#        domake any_other_make_target
#
# This script will execute make in the build directory.
# It will first set the path to the path, where the cross compiler
# can be found. If your cross compiler is in an other directory,
# please change the "PREFIX:" line below or specify it at the command line
# ("PREFIX=what_you_want domake").
# If you have the path to the cross compiler in your default path, you will
# not need this script.
# Go to the build directory and execute make.
#
# This script needs, that the "doconf" script was executed befor.
#

# where does it go? (allow to overwrite it at the command line)
: ${PREFIX:=/usr/local}

if test ! -f ./build/Makefile; then
   echo "You must run doconf first!"
   exit 1
fi

cd build
PATH=$PREFIX/bin:$PATH
make $*
cd ..
