xref: /freebsd/usr.bin/mandoc/Makefile (revision ea5e50c2985bea029e7b30ecee773a59fe22cd68)
1.include <src.opts.mk>
2
3MANDOCDIR=	${SRCTOP}/contrib/mandoc
4.PATH: ${MANDOCDIR}
5
6PACKAGE=	mandoc
7
8PROG=	mandoc
9MAN=	mandoc.1 mandoc.db.5 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.elif defined(BOOTSTRAPPING)
18.error MK_MAN_UTILS should be set to yes when bootstrapping
19.endif
20
21FILESGROUPS=	TRIGGERS
22TRIGGERS=	mandoc.ucl
23TRIGGERSDIR=	/usr/share/pkg/triggers
24
25LIBMAN_SRCS=	man.c \
26		man_macro.c \
27		man_validate.c
28
29LIBMDOC_SRCS=	arch.c \
30		att.c \
31		lib.c \
32		mdoc.c \
33		mdoc_argv.c \
34		mdoc_macro.c \
35		mdoc_markdown.c \
36		mdoc_state.c \
37		mdoc_validate.c \
38		st.c \
39
40LIBROFF_SRCS=	eqn.c \
41		roff.c \
42		roff_escape.c \
43		roff_html.c \
44		roff_term.c \
45		roff_validate.c \
46		tbl.c \
47		tbl_data.c \
48		tbl_layout.c \
49		tbl_opts.c \
50
51LIB_SRCS=	${LIBMAN_SRCS} \
52		${LIBMDOC_SRCS} \
53		${LIBROFF_SRCS} \
54		chars.c \
55		mandoc.c \
56		mandoc_aux.c \
57		mandoc_dbg.c \
58		mandoc_msg.c \
59		mandoc_ohash.c \
60		mandoc_xr.c \
61		msec.c \
62		preconv.c \
63		read.c \
64		compat_recallocarray.c \
65
66HTML_SRCS=	eqn_html.c \
67		html.c \
68		man_html.c \
69		mdoc_html.c \
70		tbl_html.c
71
72MAN_SRCS=	mdoc_man.c
73
74TERM_SRCS=	eqn_term.c \
75		man_term.c \
76		mdoc_term.c \
77		term.c \
78		term_ascii.c \
79		term_ps.c \
80		term_tab.c \
81		term_tag.c \
82		tbl_term.c
83
84DBM_SRCS=	dbm.c \
85		dbm_map.c \
86		mansearch.c
87
88DBA_SRCS=	dba.c \
89		dba_array.c \
90		dba_read.c \
91		dba_write.c \
92		mandocdb.c
93
94SRCS=		${LIB_SRCS} \
95		${HTML_SRCS} \
96		${MAN_SRCS} \
97		${TERM_SRCS} \
98		${DBM_SRCS} \
99		${DBA_SRCS} \
100		main.c \
101		manpath.c \
102		out.c \
103		tag.c \
104		tree.c
105
106WARNS?=	3
107CFLAGS+= -DHAVE_CONFIG_H \
108	 -I${SRCTOP}/lib/libopenbsd/
109# This can be removed after swtiching to newer gcc
110CFLAGS.gcc+=	-Wno-format
111LIBADD=	openbsd z
112
113.include <bsd.prog.mk>
114