rirpova
[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: %.ps
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 htm: *.tex
32         scp -r gapil/* piccardi@firenze.linux.it:public_html/gapil/html
33         scp gapil.p* piccardi@firenze.linux.it:public_html/gapil/
34
35 gapil.dvi:  *.tex
36         latex gapil.tex
37
38 gapil.pdf:  *.tex
39         pdflatex gapil.tex
40
41 gapil.ps: gapil.dvi 
42         dvips -o gapil.ps gapil.dvi
43
44 install:
45         scp -r gapil.p*  piccardi@firenze.linux.it:public_html/gapil
46         scp -r gapil/*  piccardi@firenze.linux.it:public_html/gapil/html
47         scp html/*.html piccardi@firenze.linux.it:public_html/gapil/
48 clean: 
49         rm -f *.dvi *.log *.ps *.html *.aux *.toc *.rel *.ilg *.rip *.ind \
50         *.pdf  *.out *.idx *~ listati/*.html img/*.ps img/*.pdf
51