#! /bin/sh

st=-static
exe=
mach=
mlmach=
case `uname -s` in
Linux)	tag=Linux
	mach=-m32
	mlmach=-b32 ;;
Darwin)	tag=Mac
	st=-static-libgcc ;;
CYG*)	tag=Windows
	exe=.exe ;;
esac

./configure CFLAGS="-O3 -fomit-frame-pointer -ffast-math $st $mach" MCFLAGS="-st $mlmach"

make math

for file in Vegas Suave Divonne Cuhre ; do
  gzip $file$exe
  mv $file$exe.gz $file$exe-$tag.gz
done

