#!/bin/sh TARGET=mipsel-elf PREFIX=/usr/local # --------------------------------------------------------------- # 1. Binutils bauen und installieren # --------------------------------------------------------------- if [ ! -d ./binutils-2.19 ]; then tar -xjf binutils-2.19.tar.bz2 fi if [ ! -d ./binutils-2.19_build ]; then mkdir -p binutils-2.19_build cd binutils-2.19_build ../binutils-2.19/configure --target=$TARGET --prefix=$PREFIX make make install cd .. else echo binutils is already built. fi # --------------------------------------------------------------- # 2. GCC & newlib bauen und installieren # --------------------------------------------------------------- if [ ! -d ./newlib-1.16.0 ]; then tar -xzf newlib-1.16.0.tar.gz fi if [ ! -d ./gcc-4.3.2 ]; then tar -xjf gcc-4.3.2.tar.bz2 cd ./gcc-4.3.2 ln -sf ../newlib-1.16.0/newlib/ . cd .. fi if [ ! -d ./gcc-4.3.2_build ]; then mkdir -p gcc-4.3.2_build cd gcc-4.3.2_build ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --with-newlib --verbose --enable-languages="c,c++" make all make info make install cd .. else echo GCC is already built. fi