view compile @ 272:bb2b4613fdc8

Added support for encoding integers and booleans as JSON
author Michael Pavone <pavone@retrodev.com>
date Sat, 19 Jul 2014 20:18:34 -0700
parents cba0cb39517a
children a923b5b7da3d
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 -ldl