source: trunk/unix/Makefile @ 203

Last change on this file since 203 was 203, checked in by nanardon, 16 years ago
  • add sparse file frame
  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1# $Id: Makefile 187 2008-09-05 02:43:56Z nanardon $
2
3.SUFFIXES: .dvi .pdf .eps .fig .png .jpg
4
5PWD=$(shell pwd)
6
7# unix
8
9unix_TEX = \
10    unix.tex
11
12unix_INCLUDES = \
13
14unix_EXAMPLES = \
15        deleteopen.pl \
16        nosegfault.c \
17        malloc.c \
18        fork.c \
19        sparce.c \
20
21unix_IMAGESJPG= \
22
23unix_IMAGESPNG= \
24        asus_mb.png \
25        process.png \
26        fork.png \
27        compil.png \
28        x.png \
29        x-mplayer-capcv.png \
30        x-mplayer-capcv-twm.png \
31        x-resume.png \
32
33unix_FIGURES= \
34
35unix_IMAGES= $(unix_IMAGESJPG) $(unix_IMAGESPNG)
36
37unix_PDFDEPS = Makefile \
38        $(unix_INCLUDES) \
39        $(unix_EXAMPLES) \
40        $(unix_FIGURES) \
41        $(unix_IMAGES) \
42
43unix_DVIDEPS = Makefile \
44        $(unix_INCLUDES) \
45        $(unix_EXAMPLES) \
46        $(unix_FIGURES) \
47        $(unix_IMAGES) \
48        $(unix_PNGEPS) \
49
50
51unix_DVI = $(unix_TEX:.tex=.dvi)
52unix_PDF = $(unix_TEX:.tex=.pdf)
53unix_EPS = $(unix_FIGEPS) $(unix_PNGEPS) $(unix_JPGEPS)
54unix_FIGEPS = $(unix_FIGURES:.fig=.eps) 
55unix_PNGEPS = $(unix_IMAGESPNG:.png=.eps)
56unix_JPGEPS = $(unix_IMAGESJPG:.jpg=.eps)
57
58# Everything
59ALL_PDF = $(unix_PDF)
60ALL_DVI = $(unix_DVI)
61
62all: pdf
63
64pdf: $(ALL_PDF)
65
66dvi: $(ALL_DVI)
67
68unix.pdf: $(unix_TEX) $(unix_PDFDEPS)
69        pdflatex -halt-on-error $< && pdflatex -halt-on-error $< 
70
71unix.dvi: $(unix_TEX) $(unix_DVIDEPS)
72        latex -halt-on-error $< && latex -halt-on-error $< 
73
74%.eps: %.fig
75        fig2dev -L eps  $< $@
76
77%.png: %.dia
78        dia -e $@ $<
79
80.png.eps:
81        convert $< $@
82
83.jpg.eps:
84        convert $< $@
85
86libsmall.so: libsmall.o
87        gcc -shared -o $@ $<
88
89libsmall.a: libsmall.o
90        ar rcs $@ $<
91
92small.dyn: small.o libsmall.so
93        gcc -Wl,-rpath=$(PWD) -I. -L. -lsmall -o $@ small.o
94
95small.static: small.o libsmall.a
96        gcc -I. -o $@ small.o libsmall.a
97
98clean:
99        rm -f $(FIGEPS)
100        rm -f $(ALL_DVI)
101        rm -f $(ALL_PDF)
102
103.PHONY: pdf dvi clean all
Note: See TracBrowser for help on using the repository browser.