SHELL = /bin/sh
CC = `case \`cputype\` in sparc) echo "gcc -O2" ;; irix6*) echo "cc -O3" ;; irix5) echo "cc -O3 -non_shared" ;; *) echo "cc -O2" ;; esac`
VERSION = 33

all:	walksat makewff

walksat: walksat.c
	$(CC)  walksat.c -lm -o walksat
walksat2: walksat2.c
	$(CC)  walksat2.c -lm -o walksat2

makewff: makewff.c
	$(CC)  makewff.c -lm -o makewff

huge: walksat.c
	$(CC) -DHuge walksat.c -lm -o walksath

prof: walksat.c
	cc walksat.c -lm -o walksat

install: walksat
	strip walksat
	cp walksat ${HOME}/bin/`cputype`/

distribution: walksat.c README cputype README.walksat
	rm -f -r walksat-dist*
	mkdir walksat-dist
	cp walksat.c README cputype README.walksat Makefile walksat-dist/
	tar cevof walksat-dist.tar walksat-dist
	compress walksat-dist.tar
	uuencode walksat-dist.tar.Z walksat-dist.tar.Z > walksat-dist.tar.Z.uu

clean:
	rm -f walksat makewff

backup:
	d=`date '+%y%m%d_%H%M'` && mkdir ../walksat_backup/$$d && cp walksat.c ../walksat_backup/$$d	
