#!/bin/sh
# SPIN - Verification Software - Version 4.0 - August 2003
#
# Copyright (c) 1989-2003 by Lucent Technologies, Bell Laboratories
# All Rights Reserved.  This software is for educational purposes only.
# No guarantee whatsoever is expressed or implied by the distribution of
# this code.
# The SPIN software is written by Gerard J. Holzmann, originally as part
# For tool documentation, e.g. books on SPIN see: http://spinroot.com/
# Send all bug-reports and/or questions to: bugs@spinroot.com            

# compile pc version with gcc
# to allow debugging with gdb

yacc -v -d spin.y

if [ -f y.tab.c ]
then
	mv y.tab.h y_tab.h	# newer systems
	mv y.tab.c y_tab.c
fi

for i in *.c
do
	echo $i
	# gcc -ggdb -DPC -DNXT -c *.c
	gcc -DPC -DNXT -O1 -c *.c
done
	
# gcc -ggdb -o gspin *.o	# debugging enabled
gcc -O1 -o /bin/spin.exe *.o
