Index: /trunk/paper/Makefile
===================================================================
--- /trunk/paper/Makefile	(revision 115)
+++ /trunk/paper/Makefile	(revision 115)
@@ -0,0 +1,119 @@
+# Makefile - Delphes
+# X. Rouby 25.12.2008
+#
+# ----- Usage ----- 
+#  "make" or "make all" or "make pdf" : creates the dvi/ps/pdf file
+#  "make figure" : creates a tar ball with the list of figures.
+#  try "make what" for more info
+
+# ----- Files & Directories -----
+#  figure concerns
+EPSDIR=all_eps/
+EPSFILES=$(wildcard $(EPSDIR))
+EPSTARBZ=list_of_figures.tar.bz
+# article concerns
+SOURCEFILE=notes
+TEXFILES=$(SOURCEFILE).tex 
+# all concerns
+VPATH=.:$(EPSDIR)
+LATEXOPT = --interaction batchmode
+# batchmode remove the screen output from 'latex' and 'pdflatex'; This output is recovered with 'make debug' or 'make pdfdebug'
+
+# ----- make all  -----
+all: pdf  
+dvi: $(SOURCEFILE).dvi
+ps: $(SOURCEFILE).ps
+#pdf: lowres
+pdf: highres
+#'make highres' uses ps2pdf -> heavy file but high resolution figures
+#'make lowres' uses pdflatex -> light file but low resolution figures
+figure: epstarbz 
+manual: $(MANUAL).pdf
+
+# ----- Suffix rules -----
+$(SOURCEFILE).aux: $(TEXFILES) $(EPSFILES)
+	@echo
+	@echo Build $(SOURCEFILE).aux for proper references
+	@latex $(LATEXOPT) $(SOURCEFILE).tex
+	@echo `ls $@` : done.
+
+$(SOURCEFILE).dvi: $(SOURCEFILE).aux
+	@echo
+	@echo Build $(SOURCEFILE).dvi from the .tex file
+	@latex $(LATEXOPT) $(SOURCEFILE).tex
+	@echo `ls $@` : done.
+
+$(SOURCEFILE).ps: $(SOURCEFILE).dvi 
+	@echo
+	@echo Build $(SOURCEFILE).ps from the .dvi file
+	@dvips -q $(SOURCEFILE).dvi -o $(SOURCEFILE).ps
+	@echo `ls $@` : done.
+
+$(SOURCEFILE).pdf: pdf
+
+#'make lowres' uses pdflatex -> light file but low resolution figures
+lowres: $(TEXFILES) $(PNGFILES)
+	@echo
+	@echo "Build $(SOURCEFILE).pdf from the .tex file, with pdflatex"
+	@pdflatex $(LATEXOPT) $(SOURCEFILE).tex
+	@pdflatex $(LATEXOPT) $(SOURCEFILE).tex
+	@echo "`ls $(SOURCEFILE).pdf` (low resolution) : done."
+
+#'make highres' uses ps2pdf -> heavy file but high resolution figures
+highres: $(SOURCEFILE).ps
+	@echo
+	@echo "Build $(SOURCEFILE).pdf from the .ps file, with ps2pdf"
+	@ps2pdf $< $(SOURCEFILE).pdf
+	@echo "`ls $(SOURCEFILE).pdf` (high resolution) : done."
+
+debug: $(TEXFILES)
+	@echo
+	@echo Build $(SOURCEFILE).dvi with debug info
+	@-rm -f $(SOURCEFILE).dvi
+	@latex $(SOURCEFILE).tex
+	@mv $(SOURCEFILE).dvi debug_$(SOURCEFILE).dvi
+	@echo 'debug_$(SOURCEFILE).dvi' done, '$(SOURCEFILE).dvi' removed.
+
+pdfdebug: $(TEXFILES)
+	@echo
+	@echo Build $(SOURCEFILE).pdf with debug info
+	@-rm -f $(SOURCEFILE).pdf
+	@pdflatex $(SOURCEFILE).tex
+	@mv $(SOURCEFILE).pdf debug_$(SOURCEFILE).pdf
+	@echo 'debug_$(SOURCEFILE).pdf' done, '$(SOURCEFILE).pdf' removed.
+
+clean:
+	@echo
+	@echo "Removes the useless files (*.aux *.log *.out *.toc *.lof *.out)"
+	@-rm *.aux *.log *.out *.toc *.lof *.out -f
+	@echo done.
+
+cleanall: 
+	@echo
+	@echo Removes all output files and the useless files
+	@-rm $(SOURCEFILE).pdf $(SOURCEFILE).ps *$(SOURCEFILE).dvi $(MANUAL).pdf *.aux *.log *.toc *.lof *.out *.backup *~ -f
+	@echo done.
+
+$(EPSTARBZ): $(EPSFILES)
+	@echo
+	@echo Creating $(EPSTARBZ)
+	@tar cjf $(EPSTARBZ) $(EPSDIR)
+	@echo `ls $(EPSTARBZ)` : done.
+
+epstarbz: $(EPSTARBZ)
+
+
+
+what:
+	@echo
+	@echo Try one of these :
+	@echo "	'make' or 'make all' or 'make pdf': creates the pdf files from $(SOURCEFILE).tex"
+	@echo "		choose between 'make highres' (ps2pdf) and 'make lowres' (pdflatex) for the $(SOURCEFILE).pdf quality. Default is lowres (faster)."
+	@echo "		'make aux', 'make dvi', 'make ps', 'make pdf' also work"
+	@echo "	'make debug' and 'make pdfdebug' are the same as 'make dvi' and 'make pdf' with more output info"
+	@echo "	'make figure' : creates a tarball ($(EPSTARBZ)) with all the figures in eps"
+	@echo "		'make epstarbz' also work"
+	@echo "	'make clean' : removes the useless files (.aux .log)"
+	@echo "	'make cleanall' : removes all the outfiles ($(SOURCEFILE).pdf $(SOURCEFILE).ps $(SOURCEFILE).dvi)"
+	@echo "	'make what' : this help"
+
