#!/bin/sh source ./common export PATH="$prefix_dir/bin:${PATH:+:${PATH}}" options_do_configure=1 options_do_build=1 options_do_install=1 if [ "$0" == "-i" ]; then options_do_configure= options_do_build= options_do_install=1 fi mkdir -p build/newlib-$newlib_ver cd build/newlib-$newlib_ver if [ -n "$options_do_configure" ]; then echo "Configuring newlib-${newlib_ver}" CFLAGS_FOR_TARGET="-g -O2 -msoft-float -march=m4k" \ ../../unpacked/newlib-$newlib_ver/configure \ --prefix=$prefix_dir \ --target=$target \ --with-float=soft \ --enable-soft-float \ >configure.log 2>&1 ret=$? if [ $ret -ne 0 ]; then less configure.log; exit 1; fi fi if [ -n "$options_do_build" ]; then echo "Building newlib-$newlib_ver" make -j$jobs >build.log 2>&1 ret=$? if [ $ret -ne 0 ]; then less build.log; exit 1; fi fi if [ -n "$options_do_install" ]; then echo "Installing newlib-$newlib_ver" make install >install.log 2>&1 ret=$? if [ $ret -ne 0 ]; then less install.log; exit 1; fi fi if [ -z "$options_do_configure$options_do_build$options_do_install" ]; then echo "Nothing to be done for newlib-$newlib_ver" else echo "Done with newlib-$newlib_ver" fi