comparison compile @ 36:3b0503a67165

Add scripts for building programs via C using d8 rather than a browser
author Mike Pavone <pavone@retrodev.com>
date Tue, 10 Jul 2012 19:22:19 -0700
parents
children 7f635666c73d
comparison
equal deleted inserted replaced
35:bf5e88f6419d 36:3b0503a67165
1 #!/bin/sh
2
3 cname=`basename $1`.c
4
5 if test -f "$cname"; then
6 rm "$cname"
7 fi
8
9 d8 tpc.js -- $1 > $cname
10
11 if test ! -s "$cname"; then
12 echo "Compilation to C failed"
13 exit 1
14 fi
15
16 bin=`echo $1 | sed s/\.tp//`
17 shift
18 gcc $@ -o $bin $cname runtime/object.c