SOURCE_IMG = $(wildcard images/*.dia) PS_IMG = $(SOURCE_IMG:.dia=.ps) EPS_IMG = $(SOURCE_IMG:.dia=.eps) PDF_IMG = $(SOURCE_IMG:.dia=.pdf) PNG_IMG= $(wildcard images/*.png) PNG_EPS_IMG = $(PNG_IMG:.png=.eps) SOURCE = sicurezza.tex OUTPS = $(SOURCE:.tex=.ps) OUTDVI = $(SOURCE:.tex=.dvi) OUTPDF = $(SOURCE:.tex=.pdf) OUTAUX = $(SOURCE:.tex=.aux) TEXFILES = $(wildcard *.tex) all: $(PDF_IMG) $(PNG_EPS_IMG) $(OUTPDF) $(OUTPDF): $(TEXFILES) pdflatex $(@:.pdf=.tex) makeindex $(@:.pdf=.idx) bibtex $(@:.pdf=) pdflatex $(@:.pdf=.tex) pdflatex $(@:.pdf=.tex) $(OUTDVI): %.dvi : %.tex latex $< $(OUTPS): %.ps : %.dvi dvips $< $(OUTAUX): %.aux : %.tex latex $< makeindex $(<:.tex=.idx) bibtex $(<:.tex=) latex $< $(PNG_EPS_IMG): %.eps : %.png # sam2p $< EPS: $@ pngtopnm $< | pnmtops -noturn -scale=0.5 > $@ $(PDF_IMG): %.pdf: %.eps epstopdf $< --outfile=$@ $(PS_IMG): %.ps : %.eps eps2eps $< $@ $(EPS_IMG): %.eps : %.dia dia --nosplash -e $@ $< clean: rm -f *.dvi *.log *.ps *.html *.aux *.toc *.rel *.ilg *.rip *.ind \ *.pdf *.out *.idx *~ rm -f images/*.ps images/*.pdf images/*.eps sicurezza.tgz: $(wildcard *.tex) $(SOURCE_IMG) $(PNG_IMG) Makefile $(wildcard ../images/*.png) tar -f $@ -cvz $^ firewall.tgz: firewall.tex $(SOURCE_IMG) $(PNG_IMG) Makefile $(wildcard ../images/*.png) tar -f $@ -cz $^ ids.tgz: ids.tex $(SOURCE_IMG) $(PNG_IMG) Makefile $(wildcard ../images/*.png) tar -f $@ -cz $^