]> git.cameronkatri.com Git - mandoc.git/blob - Makefile
*** empty log message ***
[mandoc.git] / Makefile
1 CFLAGS += -W -Wall -Wno-unused-parameter -g
2
3 LINTFLAGS += -c -e -f -u
4
5 LNS = mdocml.ln html4_strict.ln dummy.ln libmdocml.ln roff.ln
6
7 LLNS = llib-lmdocml.ln
8
9 LIBS = libmdocml.a
10
11 OBJS = mdocml.o html4_strict.o dummy.o libmdocml.o roff.o
12
13 SRCS = mdocml.c html4_strict.c dummy.c libmdocml.c roff.c
14
15 HEADS = libmdocml.h private.h
16
17 MANS = mdocml.1
18
19 CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS)
20
21 INSTALL = Makefile $(HEADS) $(SRCS) $(MANS)
22
23 FAIL = test.0 test.1 test.2 test.3 test.4 test.5 test.6 \
24 test.15 test.20
25
26 SUCCEED = test.7 test.8 test.9 test.10 test.11 test.12 test.13 \
27 test.14 test.16 test.17 test.18 test.19 test.21
28
29
30 all: mdocml
31
32 lint: llib-lmdocml.ln
33
34 dist: mdocml.tgz
35
36 regress: mdocml
37 @for f in $(FAIL); do ./mdocml $$f 1>/dev/null 2>/dev/null || continue ; done
38 @for f in $(SUCCEED); do ./mdocml $$f 1>/dev/null || exit 1 ; done
39
40 mdocml: mdocml.o libmdocml.a
41 $(CC) $(CFLAGS) -o $@ mdocml.o libmdocml.a
42
43 clean:
44 rm -f $(CLEAN)
45
46 mdocml.tgz: $(INSTALL)
47 mkdir -p .dist/mdocml/
48 install -m 0644 $(INSTALL) .dist/mdocml/
49 ( cd .dist/ && tar zcf ../mdocml.tgz mdocml/ )
50 rm -rf .dist/
51
52 llib-lmdocml.ln: mdocml.ln libmdocml.ln html4_strict.ln dummy.ln roff.ln
53 $(LINT) $(LINTFLAGS) -Cmdocml mdocml.ln libmdocml.ln html4_strict.ln dummy.ln roff.ln
54
55 mdocml.ln: mdocml.c
56
57 mdocml.o: mdocml.c
58
59 mdocml.c: libmdocml.h
60
61 libmdocml.a: libmdocml.o html4_strict.o dummy.o roff.o
62 $(AR) rs $@ libmdocml.o html4_strict.o dummy.o roff.o
63
64 html4_strict.ln: html4_strict.c
65
66 html4_strict.o: html4_strict.c
67
68 html4_strict.c: private.h libmdocml.h
69
70 roff.ln: roff.c
71
72 roff.o: roff.c
73
74 roff.c: private.h libmdocml.h
75
76 libmdocml.ln: libmdocml.c
77
78 libmdocml.o: libmdocml.c
79
80 libmdocml.c: private.h libmdocml.h
81