xref: /freebsd/usr.bin/mandoc/Makefile (revision 315ee00fa9616b0a192b6834911f98bcf5316a6b)
1
2.include <src.opts.mk>
3
4MANDOCDIR=	${SRCTOP}/contrib/mandoc
5.PATH: ${MANDOCDIR}
6
7PROG=	mandoc
8MAN=	mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 roff.7
9MLINKS=	mandoc.1 mdocml.1
10.if ${MK_MAN_UTILS} != no
11MAN+=	apropos.1 makewhatis.8
12MLINKS+=	apropos.1 whatis.1
13LINKS=	${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
20LIBMAN_SRCS=	man.c \
21		man_macro.c \
22		man_validate.c
23
24LIBMDOC_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
35LIBROFF_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
45LIB_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
59HTML_SRCS=	eqn_html.c \
60		html.c \
61		man_html.c \
62		mdoc_html.c \
63		tbl_html.c
64
65MAN_SRCS=	mdoc_man.c
66
67TERM_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
77DBM_SRCS=	dbm.c \
78		dbm_map.c \
79		mansearch.c
80
81DBA_SRCS=	dba.c \
82		dba_array.c \
83		dba_read.c \
84		dba_write.c \
85		mandocdb.c
86
87SRCS=		${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
99WARNS?=	3
100CFLAGS+= -DHAVE_CONFIG_H \
101	 -I${SRCTOP}/lib/libopenbsd/
102# This can be removed after swtiching to newer gcc
103CFLAGS.gcc+=	-Wno-format
104LIBADD=	openbsd z
105
106.include <bsd.prog.mk>
107