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