all:
	ghc point.io/Point.hs kdtree/kdtree.hs nn/nn.hs frp/frp.hs frp/teste.frp.hs -o tsp.frp -O2 -prof -auto-all
	ghc point.io/Point.hs nn/nn.hs nn/teste.nn.hs -o tsp.nn -O2 -prof -auto-all
	ghc point.io/Point.hs greedy/greedy.hs greedy/teste.greedy.hs -o tsp.greedy -O2 -prof -auto-all
	ghc point.io/Point.hs pq/binpq.hs kdtree/kdtree.hs kdtree/kdtree.aux.hs pqgreedy/pqgreedy.hs pqgreedy/teste.pqgreedy.hs -o tsp.pqgreedy -O2 -prof -auto-all
	pdflatex doc/artigo.tex
test:
	ghc Point.hs nn/nn.hs teste.tour.hs -o teste
run:
	gzip -dc test.data/a280.tsp.gz | test.data/frtsplib.pl | ./teste
	gzip -dc test.data/att48.tsp.gz | test.data/frtsplib.pl | ./teste
	gzip -dc test.data/bays29.tsp.gz | test.data/frtsplib.pl | ./teste
	gzip -dc test.data/kroA100.tsp.gz | test.data/frtsplib.pl | ./teste
	gzip -dc test.data/pr1002.tsp.gz | test.data/frtsplib.pl | ./teste
tar:
	tar jcvf tp0.tar.bz2 pq/*.hs pq/Makefile kdtree/*.hs kdtree/Makefile nn/*.hs nn/Makefile frp/*.hs frp/Makefile greedy/*.hs greedy/Makefile pqgreedy/*.hs pqgreedy/Makefile point.io/Point.hs doc/*.tex Makefile id
