SOURCE_IMG = $(wildcard images/*.dia) PS_IMG = $(SOURCE_IMG:.dia=.ps) EPS_IMG = $(SOURCE_IMG:.dia=.eps) PDF_IMG = $(SOURCE_IMG:.dia=.pdf) SOURCE = corso.tex OUTPS = $(SOURCE:.tex=.ps) OUTDVI = $(SOURCE:.tex=.dvi) OUTPDF = $(SOURCE:.tex=.pdf) PNG_IMG = $(wildcard images/*.png) OUTAUX = $(SOURCE:.tex=.aux) PNG_IMG= $(wildcard images/*.png) PNG_EPS_IMG = $(PNG_IMG:.png=.eps) all: $(PDF_IMG) $(PNG_EPS_IMG) $(OUTPDF) $(PNG_EPS_IMG): %.eps : %.png pngtopnm $< | pnmtops -noturn > $@ $(PDF_IMG): %.pdf: %.ps epstopdf $< --outfile=$@ $(PS_IMG): %.ps : %.eps eps2eps $< $@ $(EPS_IMG): %.eps : %.dia dia --nosplash -e $@ $< $(OUTDVI): %.dvi : %.tex latex $< $(OUTPS): %.ps : %.dvi dvips $< $(OUTPDF): %.pdf : %.aux pdflatex $(<:.aux=.tex) $(OUTAUX): %.aux : %.tex pdflatex $< clean: rm -f *.dvi *.log *.ps *.html *.aux *.toc *.rel *.ilg *.rip *.ind \ *.pdf *.out *.idx *~ rm -f images/*.ps images/*.pdf images/*.eps