]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/mandoc/Makefile
MFV: file 5.45.
[FreeBSD/FreeBSD.git] / usr.bin / mandoc / Makefile
1
2 .include <src.opts.mk>
3
4 MANDOCDIR=      ${SRCTOP}/contrib/mandoc
5 .PATH: ${MANDOCDIR}
6
7 PROG=   mandoc
8 MAN=    mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 roff.7
9 MLINKS= mandoc.1 mdocml.1
10 .if ${MK_MAN_UTILS} != no
11 MAN+=   apropos.1 makewhatis.8
12 MLINKS+=        apropos.1 whatis.1
13 LINKS=  ${BINDIR}/mandoc ${BINDIR}/whatis \
14         ${BINDIR}/mandoc ${BINDIR}/makewhatis \
15         ${BINDIR}/mandoc ${BINDIR}/apropos
16 .elif defined(BOOTSTRAPPING)
17 .error MK_MAN_UTILS should be set to yes when bootstrapping
18 .endif
19
20 LIBMAN_SRCS=    man.c \
21                 man_macro.c \
22                 man_validate.c
23
24 LIBMDOC_SRCS=   arch.c \
25                 att.c \
26                 lib.c \
27                 mdoc.c \
28                 mdoc_argv.c \
29                 mdoc_macro.c \
30                 mdoc_markdown.c \
31                 mdoc_state.c \
32                 mdoc_validate.c \
33                 st.c \
34
35 LIBROFF_SRCS=   eqn.c \
36                 roff.c \
37                 roff_html.c \
38                 roff_term.c \
39                 roff_validate.c \
40                 tbl.c \
41                 tbl_data.c \
42                 tbl_layout.c \
43                 tbl_opts.c \
44
45 LIB_SRCS=       ${LIBMAN_SRCS} \
46                 ${LIBMDOC_SRCS} \
47                 ${LIBROFF_SRCS} \
48                 chars.c \
49                 mandoc.c \
50                 mandoc_aux.c \
51                 mandoc_msg.c \
52                 mandoc_ohash.c \
53                 mandoc_xr.c \
54                 msec.c \
55                 preconv.c \
56                 read.c \
57                 compat_recallocarray.c \
58
59 HTML_SRCS=      eqn_html.c \
60                 html.c \
61                 man_html.c \
62                 mdoc_html.c \
63                 tbl_html.c
64
65 MAN_SRCS=       mdoc_man.c
66
67 TERM_SRCS=      eqn_term.c \
68                 man_term.c \
69                 mdoc_term.c \
70                 term.c \
71                 term_ascii.c \
72                 term_ps.c \
73                 term_tab.c \
74                 term_tag.c \
75                 tbl_term.c
76
77 DBM_SRCS=       dbm.c \
78                 dbm_map.c \
79                 mansearch.c
80
81 DBA_SRCS=       dba.c \
82                 dba_array.c \
83                 dba_read.c \
84                 dba_write.c \
85                 mandocdb.c
86
87 SRCS=           ${LIB_SRCS} \
88                 ${HTML_SRCS} \
89                 ${MAN_SRCS} \
90                 ${TERM_SRCS} \
91                 ${DBM_SRCS} \
92                 ${DBA_SRCS} \
93                 main.c \
94                 manpath.c \
95                 out.c \
96                 tag.c \
97                 tree.c
98
99 WARNS?= 3
100 CFLAGS+= -DHAVE_CONFIG_H \
101          -I${SRCTOP}/lib/libopenbsd/
102 # This can be removed after swtiching to newer gcc
103 CFLAGS.gcc+=    -Wno-format
104 LIBADD= openbsd z
105
106 .include <bsd.prog.mk>