Commit dimenticato.
[gapil.git] / Makefile
1 SRC_IMG = $(wildcard img/*.dia)
2 PS_IMG  = $(SRC_IMG:.dia=.ps)
3 EPS_IMG = $(SRC_IMG:.dia=.eps)
4 PDF_IMG = $(SRC_IMG:.dia=.pdf)
5 SRC    =  $(wildcard sources/*.c) $(wildcard sources/*.h) sources/Makefile
6 CODE_C =  $(wildcard listati/*.c) 
7 CODE_H =  $(wildcard listati/*.h)
8 HTML_C =  $(CODE_C:.c=.c.html) 
9 HTML_H =  $(CODE_H:.h=.h.html) 
10 VARIE = README ChangeLog *.sh htgapil.cfg tex4ht.env htgapil/* html/*.html 
11 ALL_SRC = $(SRC_IMG) $(SRC) *.tex Makefile $(VARIE) *.bib $(CODE_C) $(CODE_H)
12
13
14 all: $(PDF_IMG) $(HTML_C) $(HTML_H) gapil.pdf
15
16 $(HTML_C):  %.c.html: %.c
17         source-highlight -f html -s cpp $<
18
19 $(HTML_H):  %.h.html: %.h
20         source-highlight -f html -s cpp $<
21
22 $(PDF_IMG): %.pdf: %.eps
23         GS_OPTIONS="-dAutoRotatePages=/None" epstopdf $< --outfile=$@
24
25 $(PS_IMG): %.ps : %.eps
26         eps2eps $< $@ 
27
28 $(EPS_IMG): %.eps : %.dia
29         dia --nosplash -e $@ $< 
30
31 gapil_source.tgz: $(SRC) 
32         tar -cvz -f $@ $^
33
34 gapil.tgz:  $(ALL_SRC)
35         tar -cvz -f $@ $^
36
37 gapil.dvi:  *.tex
38         latex gapil.tex
39
40 gapil.pdf:  *.tex Makefile
41         pdflatex gapil.tex
42         bibtex gapil
43         makeindex gapil.idx
44         pdflatex gapil.tex
45
46 gapil.ps: gapil.dvi 
47         dvips -o gapil.ps gapil.dvi
48
49 #install: gapil.pdf gapil.dvi 
50 #       scp gapil.p* gapil_source.* piccardi@firenze.linux.it:public_html/gapil
51 #       scp html/*.html piccardi@firenze.linux.it:public_html/gapil/
52 #       scp gapil.p* gapil_source.tgz root@truelite.it:/var/www/gapil
53 #       scp html/*.html root@truelite.it:/var/www/gapil/
54
55 clean: 
56         rm -f *.dvi *.log *.ps *.html *.aux *.toc *.rel *.ilg *.rip *.ind \
57         *.pdf  *.out *.idx *~ listati/*.html img/*.ps img/*.eps img/*.pdf 
58