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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #!/bin/sh
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 cname=`basename $1`.c
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 if test -f "$cname"; then
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 rm "$cname"
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 fi
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8
79
7f635666c73d Add hash and int32 messages to string. Add hash message to int32. Update compile script
Mike Pavone <pavone@retrodev.com>
parents: 36
diff changeset
9 ./tpc $1 -o $cname
36
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 if test ! -s "$cname"; then
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 echo "Compilation to C failed"
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 exit 1
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 fi
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15
148
5071d601fe70 Fix small bug in compile script
Mike Pavone <pavone@retrodev.com>
parents: 79
diff changeset
16 bin=`echo $1 | sed 's/\.tp//'`
36
3b0503a67165 Add scripts for building programs via C using d8 rather than a browser
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17 shift
148
5071d601fe70 Fix small bug in compile script
Mike Pavone <pavone@retrodev.com>
parents: 79
diff changeset
18 echo gcc $@ -o $bin $cname runtime/object.c -lgc
264
cba0cb39517a Add module for interfacing with libdl
Michael Pavone <pavone@retrodev.com>
parents: 148
diff changeset
19 gcc $@ -o $bin $cname runtime/object.c -lgc -ldl