#
# Makefile for testing LIFE
#
# $Id: Makefile,v 1.5 1997/07/29 15:03:25 gniibe Exp $
#
# Copyright (C) 1997 KLIC Programming Forum
# Copyright (C) 1997 JIPDEC
#

OUTS =  glider.out blinker.out sample1.out \
        sample2.out b.out pi.out flotilla.out r.out # expo.out

LIFE = ../life

.SUFFIXES: .life .out

.life.out:
	${LIFE} $< >$@

all:
	rm -f ${OUTS}
	${MAKE} ${MFLAGS} test

test: ${OUTS}
	@STATUS=GOOD; for f in ${OUTS}; do \
	   if cmp -s $$f outputs/$$f; then \
	     echo $$f ... OK; \
	   else \
	     echo $$f ... FAIL; \
	     STATUS=BAD; \
	   fi; \
	done; test $$STATUS = GOOD

clean:
	rm -f *.out

distclean: clean

