all: index.html resume.html resume.pdf

index.html: resume.html
	ln -sf resume.html index.html

resume.pdf: resume.html
	wkhtmltopdf --zoom 1.2 --print-media-type $< $@

resume.html: resume.php style.css summary.html education.html experience.html conferences.html languages.html
	php resume.php > resume.html

%.html: %.clj node_modules
	npx nbb bin/render.cljs $< > $@

%.html: %.md node_modules
	npx nbb bin/rendermarkdown.cljs $< > $@

languages.html: stats.json node_modules
	npx nbb bin/renderlanguages.cljs stats.json > languages.html

stats.json: node_modules
	npx nbb bin/thxgh.cljs --stats chr15m > stats.json

.PHONY: clean

clean:
	rm *.html stats.json
