# Sander van Veen - 6167969 - University of Amsterdam - <sandervv@gmail.com>
#
# Basic Makefile used to simplify the compilation. Running "make" (without any
# arguments) from the command line will build the report for this assignment.
#

all: highlight graph compile

clean:
	rm -v *.out *.aux *.toc foo.tex graph.tex report.pdf

compile:
	pdflatex report
	bibtex report
	pdflatex report
	pdflatex report.tex
	rm -vf *.log

graph: graph.tex

highlight: foo.tex

foo.tex: foo.py
	pygmentize -O style=colorful -o $@ $^

graph.tex: graph.dot
	dot2tex -t math $^ | \
		sed 's/\\\(use\|enl\|doc\|page\|\(end\|begin\){doc\).*//' > $@

