| 1 | #!/bin/sh |
| 2 | # SPIN - Verification Software - Version 5.1 - November 2007 |
| 3 | # |
| 4 | # Tool documentation: http://spinroot.com/ |
| 5 | # bug-reports: bugs@spinroot.com |
| 6 | |
| 7 | # This script is for compiling Spin on a PC with a Unix shell |
| 8 | # It requires 3 things to be installed on your system: |
| 9 | # cygwin (for sh, bison yacc, echo, mv, and rm) |
| 10 | # either gcc or the Visual C++ compiler (cl) |
| 11 | # On a 2.5GHz system everything compiles in under 1 second. |
| 12 | # See also makefile for compiling Spin on a standard Unix/Linux system. |
| 13 | |
| 14 | # CC="gcc" |
| 15 | # CFLAGS="-DPC -DNXT -O1 -Wall -ansi -w -o spin.exe" |
| 16 | |
| 17 | CC="cl" # Visual Studio for a standalone compilation |
| 18 | CFLAGS="-DPC -DNXT -DWIN32 -D_CONSOLE -O2 -Zp4 -nologo -wd4996 -Fespin.exe" |
| 19 | |
| 20 | yacc -v -d spin.y |
| 21 | |
| 22 | # compile for 32 or 64 bits: |
| 23 | $CC -DWIN32 $CFLAGS *.c |
| 24 | # $CC -DWIN64 $CFLAGS *.c bufferoverflowu.lib |
| 25 | |
| 26 | rm -f *.o *.obj |
| 27 | rm -f y?tab.? y.output |
| 28 | |
| 29 | # install in the usual place on cygwin: |
| 30 | echo "mv spin.exe /usr/bin" |
| 31 | mv spin.exe /usr/bin |