view compile @ 303:60b9941d3713

Remove extra libraries from compile command line
author Michael Pavone <pavone@retrodev.com>
date Sat, 26 Jul 2014 15:01:09 -0700
parents a923b5b7da3d
children f2aff12d8e87
line wrap: on
line source

#!/bin/sh

cname=`basename $1`.c

if test -f "$cname"; then
	rm "$cname"
fi

./tpc $1 -o $cname

if test ! -s "$cname"; then
	echo "Compilation to C failed"
	exit 1
fi

bin=`echo $1 | sed 's/\.tp//'`
shift
echo gcc $@ -o $bin $cname runtime/object.c -lgc
gcc $@ -o $bin $cname runtime/object.c -lgc