source: tags/unix/20081113/Makefile @ 216

Last change on this file since 216 was 212, checked in by nanardon, 15 years ago
  • fix some typo, better order for files
  • 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        sparse.c \
20        temp.sh \
21        libsmall.c \
22        libsmall.h \
23        small.c \
24        tree.txt \
25
26unix_IMAGESJPG= \
27
28unix_IMAGESPNG= \
29        asus_mb.png \
30        process.png \
31        fork.png \
32        compil.png \
33        x.png \
34        x-mplayer-capcv.png \
35        x-mplayer-capcv-twm.png \
36        x-resume.png \
37        150px-Tux.png \
38
39unix_FIGURES= \
40
41unix_IMAGES= $(unix_IMAGESJPG) $(unix_IMAGESPNG)
42
43unix_PDFDEPS = Makefile \
44        $(unix_INCLUDES) \
45        $(unix_EXAMPLES) \
46        $(unix_FIGURES) \
47        $(unix_IMAGES) \
48
49unix_DVIDEPS = Makefile \
50        $(unix_INCLUDES) \
51        $(unix_EXAMPLES) \
52        $(unix_FIGURES) \
53        $(unix_IMAGES) \
54        $(unix_PNGEPS) \
55
56
57unix_DVI = $(unix_TEX:.tex=.dvi)
58unix_PDF = $(unix_TEX:.tex=.pdf)
59unix_EPS = $(unix_FIGEPS) $(unix_PNGEPS) $(unix_JPGEPS)
60unix_FIGEPS = $(unix_FIGURES:.fig=.eps) 
61unix_PNGEPS = $(unix_IMAGESPNG:.png=.eps)
62unix_JPGEPS = $(unix_IMAGESJPG:.jpg=.eps)
63
64# Everything
65ALL_PDF = $(unix_PDF)
66ALL_DVI = $(unix_DVI)
67
68all: pdf
69
70pdf: $(ALL_PDF)
71
72dvi: $(ALL_DVI)
73
74unix.pdf: $(unix_TEX) $(unix_PDFDEPS)
75        pdflatex -halt-on-error $< && pdflatex -halt-on-error $< 
76
77unix.dvi: $(unix_TEX) $(unix_DVIDEPS)
78        latex -halt-on-error $< && latex -halt-on-error $< 
79
80%.eps: %.fig
81        fig2dev -L eps  $< $@
82
83%.png: %.dia
84        dia -e $@ $<
85
86.png.eps:
87        convert $< $@
88
89.jpg.eps:
90        convert $< $@
91
92libsmall.so: libsmall.o
93        gcc -shared -o $@ $<
94
95libsmall.a: libsmall.o
96        ar rcs $@ $<
97
98small.dyn: small.o libsmall.so
99        gcc -Wl,-rpath=$(PWD) -I. -L. -lsmall -o $@ small.o
100
101small.static: small.o libsmall.a
102        gcc -I. -o $@ small.o libsmall.a
103
104clean:
105        rm -f $(FIGEPS)
106        rm -f $(ALL_DVI)
107        rm -f $(ALL_PDF)
108
109.PHONY: pdf dvi clean all
Note: See TracBrowser for help on using the repository browser.