PUBLISH=./publish/
PKGS=TEXINPUTS=./style//:$(TEXINPUTS)

LATEX=/usr/bin/xelatex
LATEXOPT=-halt-on-error -interaction errorstopmode -output-directory $(PUBLISH) ./Games.tex

all: clean compile

clean:
	rm -rf $(PUBLISH)*

compile:
	$(PKGS) $(LATEX) $(LATEXOPT)
	$(PKGS) $(LATEX) $(LATEXOPT)

recompile:
	$(PKGS) $(LATEX) $(LATEXOPT)
	$(PKGS) $(LATEX) $(LATEXOPT)

open:
	xdg-open $(PUBLISH)Games.pdf
