PDF_CMD=pdflatex -synctex=1 -interaction=nonstopmode
BIB_CMD=bibtex 

all: Main.pdf

Main.pdf: clean
	$(PDF_CMD) Main.tex
	$(BIB_CMD) Main.aux
	$(PDF_CMD) Main.tex
	$(PDF_CMD) Main.tex


clean: SHELL:=/bin/bash
clean:
	@rm_exts=('*.synctex.gz' '*.ps' '*.dvi' '*.aux' '*.toc' '*.idx' '*.ind' '*.ilg' '*.log' '*.out' '*.brf' '*.blg' '*.bbl'); \
	for i in "$${rm_exts[@]}"; \
		do \
			find . -name "$$i" -exec rm {} \;; \
		done \

