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