# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#  latex prosper template makefile
#  this file is part of kdissert templates
#  http://freehackers.org/~tnagy/kdissert/index.html
#  created by Thomas Nagy <tnagy2^8@yahoo.fr, 2004
#  permission is granted to distribute modifications and
#  copies of this file without restrictions
#

# main target
all: main.ps

pdf: main.pdf

main.ps: main.tex
	export TEXINPUTS=$$TEXINPUTS:.:`pwd`/prospermindist/; \
       	export GS_OPTIONS="-sPAPERSIZE=a4"; \
	latex main.tex -o main.dvi
	dvips main.dvi -o main.ps
	@echo "-> make view"

view: main.ps
	gv main.ps

clean:
	rm -f main.out main.aux main.toc main.log

# pdf generation may or may not work (try and see)
main.pdf: main.tex
	export TEXINPUTS=$$TEXINPUTS:.:`pwd`/prospermindist/; \
	export GS_OPTIONS="-sPAPERSIZE=a4"; \
	latex main.tex -o main.dvi
	dvips main.dvi -o main.ps
	ps2pdf -sPAPERSIZE=a4 main.ps
	@echo "-> make viewpdf"

viewpdf: main.pdf
	kpdf main.pdf

# use "make touch" to get cross-references right
touch:
	touch main.tex && make
