xref: /freebsd/usr.bin/mandoc/Makefile (revision bd81e07d2761cf1c13063eb49a5c0cb4a6951318)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5MDOCMLDIR=	${.CURDIR}/../../contrib/mdocml
6.PATH: ${MDOCMLDIR}
7
8PROG=	mandoc
9FILES=	example.style.css style.css
10FILESDIR=	${SHAREDIR}/mdocml
11MAN=	mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 # roff.7
12MLINKS=	mandoc.1 mdocml.1
13.if ${MK_MANDOCDB} != no
14MAN+=	apropos.1 makewhatis.8
15MLINKS+=	apropos.1 whatis.1
16LINKS=	${BINDIR}/mandoc ${BINDIR}/whatis \
17	${BINDIR}/mandoc ${BINDIR}/makewhatis \
18	${BINDIR}/mandoc ${BINDIR}/apropos
19.endif
20
21LIBMAN_SRCS=	man.c \
22		man_hash.c \
23		man_macro.c \
24		man_validate.c
25
26LIBMDOC_SRCS=	att.c \
27		lib.c \
28		mdoc.c \
29		mdoc_argv.c \
30		mdoc_hash.c \
31		mdoc_macro.c \
32		mdoc_validate.c \
33		st.c \
34
35LIBROFF_SRCS=	eqn.c \
36		roff.c \
37		tbl.c \
38		tbl_data.c \
39		tbl_layout.c \
40		tbl_opts.c \
41
42LIB_SRCS=	${LIBMAN_SRCS} \
43		${LIBMDOC_SRCS} \
44		${LIBROFF_SRCS} \
45		chars.c \
46		mandoc.c \
47		mandoc_aux.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
68DB_SRCS=	mandocdb.c \
69		mansearch.c \
70		mansearch_const.c \
71		manpath.c
72
73SRCS=		${LIB_SRCS} \
74		${HTML_SRCS} \
75		${MAN_SRCS} \
76		${TERM_SRCS} \
77		main.c \
78		out.c \
79		tree.c
80
81SRCS+=	${DB_SRCS}
82
83WARNS?=	2
84CFLAGS+= -DHAVE_CONFIG_H \
85	 -I${.CURDIR}/../../lib/libohash/ \
86	 -I${.CURDIR}/../../contrib/sqlite3
87LIBADD=	ohash sqlite3 z
88
89.include <bsd.prog.mk>
90