CC		= cc
CFLAGS		=
JAVA		= java
JAVAC		= javac
JFLAGS		=
OUTFILES	= TestRandom.out testrandom.out testrandom-diehard.out
RM		= /bin/rm -f
SHELL		= /bin/sh

all:	$(OUTFILES)

clean:
	-$(RM) *.class
	-$(RM) *.i
	-$(RM) *.o
	-$(RM) *~
	-$(RM) \#*
	-$(RM) a.out
	-$(RM) core core.*

mostlyclean:	clean
	-$(RM) $(OUTFILES) testrandom-diehard testrandom-diehard

clobber distclean:	mostlyclean

maintainer-clean:	distclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."

TestRandom.class:	TestRandom.java
	$(JAVAC) $(JFLAGS) $?

TestRandom.out:	TestRandom.class
	$(JAVA) TestRandom > $@

testrandom:	testrandom.c
	$(CC) $(CFLAGS) $? -o $@

testrandom.out:	testrandom
	./$? > $@

testrandom-diehard.out:	testrandom-diehard
	./$? > $@

testrandom-diehard:	testrandom-diehard.c
	$(CC) $(CFLAGS) $? -o $@
