all: topy report.pdf

clean:
	rm -f func.i topy x.dat func.i~ graph.tex
	rm -f report.aux report.dvi report.pdf report.log

func.i: func.mpl
	maple func.mpl
	indent -kr -ts4 -nlp func.i

topy: topy.c func.i
	gcc -o topy topy.c -lm

x.dat: topy
	./topy >x.dat

graph.tex: graph.plt x.dat
	gnuplot graph.plt

report.dvi: report.tex graph.tex
	latex report.tex

report.pdf: report.dvi
	dvipdf report.dvi
