.SUFFIXES: $(.SUFFIXES) .tex .pdf .bbl

####
#### Faire "make" pour obtenir le phd.pdf
####


#
# $* -> target name only
# $< -> source name complete
# $@ -> target name complete
#
PDFLATEX= pdflatex

#
# The list of all documents to make
#

TEX= phd.tex
PDF= phd.pdf
BBL= phd.bbl


all: $(PDF)
bib: $(PDF) $(BBL)

.tex.pdf:
	$(PDFLATEX) $*
	# pour assurer que les references sont toujours bonnes
	$(PDFLATEX) $*

.tex.bbl:
	bibtex $*
	# inserer les references
	$(PDFLATEX) $*
	# pour assurer que les references sont toujours bonnes
	$(PDFLATEX) $*

clean:
	- rm *.aux
	- rm phd.bbl phd.blg phd.lof phd.log phd.toc phd.pdf

redo:
	touch $(TEX)

#
# lien de dependance avec les chapitres de la these
#
phd.pdf:	thesis.cls \
		hyphen.tex \
		preliminaire.tex \
		resume.tex \
		abstract.tex \
		c_intro.tex \
		c_stereo.tex \
		c_calib.tex \
		newmotionpaper.tex \
		c_rectif.tex \
		rectifpaper.tex \
		c_morestereo.tex \
		maxflowpaper.tex \
		c_discussion.tex \
		c_markov.tex


