xref: /freebsd/usr.bin/mandoc/Makefile (revision 6829dae12bb055451fa467da4589c43bd03b1e64)
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=	att.c \
24		lib.c \
25		mdoc.c \
26		mdoc_argv.c \
27		mdoc_macro.c \
28		mdoc_markdown.c \
29		mdoc_state.c \
30		mdoc_validate.c \
31		st.c \
32
33LIBROFF_SRCS=	eqn.c \
34		roff.c \
35		roff_html.c \
36		roff_term.c \
37		roff_validate.c \
38		tbl.c \
39		tbl_data.c \
40		tbl_layout.c \
41		tbl_opts.c \
42
43LIB_SRCS=	${LIBMAN_SRCS} \
44		${LIBMDOC_SRCS} \
45		${LIBROFF_SRCS} \
46		chars.c \
47		mandoc.c \
48		mandoc_aux.c \
49		mandoc_ohash.c \
50		mandoc_xr.c \
51		msec.c \
52		preconv.c \
53		read.c \
54		compat_recallocarray.c \
55
56HTML_SRCS=	eqn_html.c \
57		html.c \
58		man_html.c \
59		mdoc_html.c \
60		tbl_html.c
61
62MAN_SRCS=	mdoc_man.c
63
64TERM_SRCS=	eqn_term.c \
65		man_term.c \
66		mdoc_term.c \
67		term.c \
68		term_ascii.c \
69		term_ps.c \
70		term_tab.c \
71		tbl_term.c
72
73DBM_SRCS=	dbm.c \
74		dbm_map.c \
75		mansearch.c
76
77DBA_SRCS=	dba.c \
78		dba_array.c \
79		dba_read.c \
80		dba_write.c \
81		mandocdb.c
82
83SRCS=		${LIB_SRCS} \
84		${HTML_SRCS} \
85		${MAN_SRCS} \
86		${TERM_SRCS} \
87		${DBM_SRCS} \
88		${DBA_SRCS} \
89		main.c \
90		manpath.c \
91		out.c \
92		tag.c \
93		tree.c
94
95WARNS?=	3
96CFLAGS+= -DHAVE_CONFIG_H \
97	 -I${SRCTOP}/lib/libopenbsd/
98LIBADD=	openbsd z
99
100.include <bsd.prog.mk>
101