# Makefile, tests directory and samples by Catherine Letondal <letondal@pasteur.fr>

test:   testdna testprot testdist testtree

testdna:
	rm -f infile
	ln -s dna.data infile
	make testprog PROGRAM=dnapars
	make testprog PROGRAM=dnaml
	make testprog PROGRAM=dnadist

testprot:
	rm -f infile
	ln -s prot.data infile
	make testprog PROGRAM=protpars
	make testprog PROGRAM=protdist

testdist:
	rm -f infile
	ln -s distance.data infile
	make testprog PROGRAM=neighbor

testtree:
	rm -f treefile
	ln -s tree.data treefile
	echo 0 > params
	echo l >> params
	echo n >> params
	echo y >> params
	phylip drawtree < params > drawtree.out
	phylip drawgram < params > drawgram.out


testprog:
	echo 0 > params
	echo y >> params
	phylip ${PROGRAM} < params > ${PROGRAM}.out

clean:
	rm -f infile *.out treefile outfile *~

