#!/bin/sh

# compile the schant scheme compiler from source
# to native binary for target machine

# first build schant scheme compiler source

COMPILE_MODE=$1 # if not bigfloat then a pure integer version

TARGET_SRC=`./expand-schant.sh $1 src/schant`

mv x.c $TARGET_SRC.c

# compile schant scheme compiler

# the combined stack / heap size is set to 48Mb

./compile-with-shmall-to-native.sh $TARGET_SRC object 22000000

rm $TARGET_SRC.c
