latex=xelatex
pdflatex=xelatex
bibtex=bibtex 

chapters = chapters/introduction.tex \
		   chapters/naive_simulator.tex \
		   chapters/introduction_qc.tex \
		   chapters/stabilizer.tex \
		   chapters/graph_simulator.tex

all: main.pdf

main.pdf: main.tex main.bib $(chapters)
	$(latex) main
	$(bibtex) main
	$(latex) main
	$(pdflatex) main

	
clean:
	-rm main.aux
	-rm main.blg
	-rm main.dvi
	-rm main.log
	-rm main.out
	-rm main.pdf
	-rm main.toc
	-rm main.bbl
