#!/bin/bash
# gcc68 batch file
# Jacky Baltes, UWA - U Auckland - U Winnipeg, 2001

# apapt the following path if necessary
EYEBOTDIR=/user/res/uwarobot/mc
GCCDIR=/usr/local/m68k-coff/bin

# Need to do this before we reset the PATH below
#files=`echo $*|tr ' ' "\n"|grep -v ^-|tr "\n" ' '`
#opts=`echo $*|tr ' ' "\n"|grep ^-|tr "\n" ' '`

CC=$GCCDIR/m68k-coff-gcc
OBJCOPY=$GCCDIR/m68k-coff-objcopy
SREC2BIN=$GCCDIR/srec2bin

WARN="-Wall"
CPU=-m68332
LIBS="-L$EYEBOTDIR/lib -lc -lrobi -lgcc -lc"
LDSCRIPT=$EYEBOTDIR/ldfiles/robi-hdt.ld

CFLAGS="-I$EYEBOTDIR/include $opts"

# run gcc for a list of .c source files

$CC $CPU $CFLAGS $WARN -I$EYEBOTDIR/include -Wl,--script=$LDSCRIPT -nostdlib $* $LIBS 
