PAPER=main.tex
SOURCE=$(wildcard *.tex)
SOURCEBIB=$(wildcard *.bib)

all: figures $(SOURCE) $(SOURCEBIB)
	latexmk -shell-escape -pdf  $(PAPER)

clean:
	rm -f *.log *.out *.aux *.fls *.bbl *.blg *.fdb_latexmk *.synctex.gz *.auxlock *.pyg

clean_all: clean
	rm -f $(PAPER:%.tex=%.pdf)

figures:
	mkdir $@

