xref: /freebsd/usr.bin/mandoc/Makefile (revision 5370c80e0e6aa7aaaf53e62ec4010cee92440a8f)
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
68DB_SRCS=	mandocdb.c \
69		mansearch.c \
70		mansearch_const.c \
71		tag.c \
72		manpath.c
73
74SRCS=		${LIB_SRCS} \
75		${HTML_SRCS} \
76		${MAN_SRCS} \
77		${TERM_SRCS} \
78		main.c \
79		out.c \
80		tree.c
81
82SRCS+=	${DB_SRCS}
83
84WARNS?=	2
85CFLAGS+= -DHAVE_CONFIG_H \
86	 -I${.CURDIR}/../../lib/libopenbsd/ \
87	 -I${.CURDIR}/../../contrib/sqlite3
88LIBADD=	openbsd sqlite3 z
89
90.include <bsd.prog.mk>
91