#!/bin/sh
#
# Erlang static compile shell script
# Compiles a group of modules together and statically links them
#
# To execute need to invoke execution stub
# We also need a program to make an executable (ie. include stub)
#

ERL=$ERLHOME
ERLANG_LIB=$ERL/erlib/:./
export ERLANG_LIB
OS=`uname`
$ERL/driver $1.e > $1.$$.c

gcc -o $1 -I$ERL/erlib/ $1.$$.c -Lerlib/liberl.a 

rm $1.$$.o
#ar crs $1.so $1.$$.o
# 'ar' the .o now?

