name=openresty-yes

.PRECIOUS: images/model-comb.dot images/p2p.dot

all: image $(name).xul

image: images/cluster-arch.png images/resty-guts.png images/web-1-0.png images/web-2-0.png images/post-web-2-0.png images/web-3-0.png images/model-comb.png images/house.png images/view-comb.png images/feed-comb.png images/action-comb.png images/role-comb.png images/p2p.png

%.slides: %.sld
	perl pre.pl $< > $@

%.xul: %.slides template/*
	perl bin/render-template $< $@

images/p2p.png: images/p2p.dot
	dot -Grankdir=LR -Tpng $< > $@


images/%-comb.png: images/%-comb.dot
	dot -Grankdir=LR -Tpng $< > $@

images/house.png: images/house.dot
	neato -Tpng $< > $@

%.png: %.dot
	dot -Tpng $< > $@

%.dot: %.tt
	tpage $< > $@

upload: all
	scp -r -P 18888 -l 5000 `pwd` agentzh@agentzh.org:~/misc/
	cd ..; targz $(name)
	cd ..; scp -P 18888 -l 500 $(name).tar.gz agentzh@agentzh.org:~/misc/

