1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
undefine(`include')
define(MakeSubdirs,
all::
for dir in $1 ; do (echo Build in $$dir; cd $$dir ; make ) ; done
clean::
for dir in $1 ; do (echo Clean in $$dir; cd $$dir ; make clean) ; done
install::
for dir in $1; do (echo Install in $$dir; cd $$dir; make install); done
)
define(DependSubdirs,
depend::
for dir in $1 ; do (cd $$dir ; make depend) ; done
)
define(NormalLibraryObjectRule,)
define(NormalLibraryTarget,
lib$1.a: $2
rm -f lib$1.a
ar r lib$1.a $2
ranlib lib$1.a
clean::
rm -f lib$1.a $2
)
define(LintLibraryTarget,)
define(CleanTarget,)
define(TagsTarget,
tags::
etags *.c *.h
)
define(NormalLintTarget,)
define(NormalProgramTarget,
$1: $2
${CC} ${CFLAGS} -o $1 $2 $4 $5
clean::
rm -f $1 $2
)
define(SingleProgramTarget,
$1: $(OBJS)
${CC} ${CFLAGS} -o $1 $(OBJS) $(LOCAL_LIBRARIES) $(SYSLIBS)
clean::
rm -f $1 $2
install::
install -c -s $1 $(BININDIR)
)
define(ComplexProgramTarget,
$1: $(OBJS)
${CC} ${CFLAGS} -o $1 $(OBJS) $(LOCAL_LIBRARIES) $(SYSLIBS)
clean::
rm -f $1 $2
install::
install -c -s $1 $(BININDIR)
)
define(InstallProgram,
install:: $1
install -c -s $1 $2
)
define(InstallNonExec,
install:: $1
install -c $1 $2
)
define(InstallScript,
install:: $1
install -c -m 555 $1.script $2/$1
)
define(InstallManPage,
install:: $1.man
install -c $1.man $2/$1.1
)
define(InstallAppDefaults,
install:: $1.ad
install -c $1.ad $RESOURCES/$1
)
define(DependTarget,)
|