]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/mandoc/Makefile
OpenZFS: MFV 2.0-rc3-gfc5966
[FreeBSD/FreeBSD.git] / usr.bin / mandoc / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4
5 MANDOCDIR=      ${SRCTOP}/contrib/mandoc
6 .PATH: ${MANDOCDIR}
7
8 PROG=   mandoc
9 MAN=    mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 roff.7
10 MLINKS= mandoc.1 mdocml.1
11 .if ${MK_MAN_UTILS} != no
12 MAN+=   apropos.1 makewhatis.8
13 MLINKS+=        apropos.1 whatis.1
14 LINKS=  ${BINDIR}/mandoc ${BINDIR}/whatis \
15         ${BINDIR}/mandoc ${BINDIR}/makewhatis \
16         ${BINDIR}/mandoc ${BINDIR}/apropos
17 .elif defined(BOOTSTRAPPING)
18 .error "MK_MAN_UTILS should be set to yes when bootstrapping"
19 .endif
20
21 LIBMAN_SRCS=    man.c \
22                 man_macro.c \
23                 man_validate.c
24
25 LIBMDOC_SRCS=   arch.c \
26                 att.c \
27                 lib.c \
28                 mdoc.c \
29                 mdoc_argv.c \
30                 mdoc_macro.c \
31                 mdoc_markdown.c \
32                 mdoc_state.c \
33                 mdoc_validate.c \
34                 st.c \
35
36 LIBROFF_SRCS=   eqn.c \
37                 roff.c \
38                 roff_html.c \
39                 roff_term.c \
40                 roff_validate.c \
41                 tbl.c \
42                 tbl_data.c \
43                 tbl_layout.c \
44                 tbl_opts.c \
45
46 LIB_SRCS=       ${LIBMAN_SRCS} \
47                 ${LIBMDOC_SRCS} \
48                 ${LIBROFF_SRCS} \
49                 chars.c \
50                 mandoc.c \
51                 mandoc_aux.c \
52                 mandoc_msg.c \
53                 mandoc_ohash.c \
54                 mandoc_xr.c \
55                 msec.c \
56                 preconv.c \
57                 read.c \
58                 compat_recallocarray.c \
59
60 HTML_SRCS=      eqn_html.c \
61                 html.c \
62                 man_html.c \
63                 mdoc_html.c \
64                 tbl_html.c
65
66 MAN_SRCS=       mdoc_man.c
67
68 TERM_SRCS=      eqn_term.c \
69                 man_term.c \
70                 mdoc_term.c \
71                 term.c \
72                 term_ascii.c \
73                 term_ps.c \
74                 term_tab.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>