TeXLIB = .:../LaTeXmacros:../bibliography/:
LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && pdflatex -halt-on-error
BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex

all : thesis.pdf

thesis.pdf : Makefile ../LaTeXmacros/common.tex cfa-format.tex thesis.tex intro.tex ctordtor.tex tuples.tex variadic.tex conclusions.tex
	${LaTeX} thesis
	${BibTeX} thesis
	${LaTeX} thesis
	${LaTeX} thesis
	pdf2ps thesis.pdf thesis.ps

clean :
	rm -f *.aux *.bbl *.blg *.lof *.log *.lot *.out *.toc

spotless : clean
	rm -f thesis.pdf thesis.ps
