Rimessi insieme i makefile e le pagine web
[gapil.git] / Makefile
1 SOURCE_IMG = $(wildcard img/*.dia)
2 PS_IMG = $(SOURCE_IMG:.dia=.ps)
3 EPS_IMG = $(SOURCE_IMG:.dia=.eps)
4 PDF_IMG = $(SOURCE_IMG:.dia=.pdf)
5 SOURCE =  $(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
11 all: $(PDF_IMG) gapil.tgz $(HTML_C) $(HTML_H) #htm 
12
13 $(HTML_C):  %.c.html: %.c
14         source-highlight -f html -s cpp $<
15
16 $(HTML_H):  %.h.html: %.h
17         source-highlight -f html -s cpp $<
18
19 $(PDF_IMG): %.pdf: %.eps
20         epstopdf $< --outfile=$@
21
22 $(PS_IMG): %.ps : %.eps
23         eps2eps $< $@ 
24
25 $(EPS_IMG): %.eps : %.dia
26         dia --nosplash -e $@ $< 
27
28 gapil.tgz: $(SOURCE) sources/Makefile
29         tar -cvz -f $@ $^
30
31 gapil.dvi:  *.tex
32         latex gapil.tex
33
34 gapil.pdf:  *.tex
35         pdflatex gapil.tex
36
37 gapil.ps: gapil.dvi 
38         dvips -o gapil.ps gapil.dvi
39
40 install: gapil.pdf gapil.dvi 
41         scp gapil.p* gapil_source.* piccardi@firenze.linux.it:public_html/gapil
42         scp html/*.html piccardi@firenze.linux.it:public_html/gapil/
43         scp gapil.p* gapil_source.tgz root@truelite.it:/var/www/gapil
44         scp html/*.html root@truelite.it:/var/www/gapil/
45
46 clean: 
47         rm -f *.dvi *.log *.ps *.html *.aux *.toc *.rel *.ilg *.rip *.ind \
48         *.pdf  *.out *.idx *~ listati/*.html img/*.ps img/*.eps img/*.pdf 
49