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