annotate compile @ 264:cba0cb39517a

Add module for interfacing with libdl
author Michael Pavone <pavone@retrodev.com>
date Mon, 14 Jul 2014 09:33:41 -0700
parents 5071d601fe70
children a923b5b7da3d
rev   line source
pavone@36 1 #!/bin/sh
pavone@36 2
pavone@36 3 cname=`basename $1`.c
pavone@36 4
pavone@36 5 if test -f "$cname"; then
pavone@36 6 rm "$cname"
pavone@36 7 fi
pavone@36 8
pavone@79 9 ./tpc $1 -o $cname
pavone@36 10
pavone@36 11 if test ! -s "$cname"; then
pavone@36 12 echo "Compilation to C failed"
pavone@36 13 exit 1
pavone@36 14 fi
pavone@36 15
pavone@148 16 bin=`echo $1 | sed 's/\.tp//'`
pavone@36 17 shift
pavone@148 18 echo gcc $@ -o $bin $cname runtime/object.c -lgc
pavone@264 19 gcc $@ -o $bin $cname runtime/object.c -lgc -ldl