1# $OpenBSD: Makefile,v 1.100 2015/10/22 22:05:42 schwarze Exp $ 2 3.include <bsd.own.mk> 4 5CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter 6DPADD += ${LIBUTIL} 7LDADD += -lsqlite3 -lutil -lz 8 9SRCS= mandoc.c mandoc_aux.c mandoc_ohash.c preconv.c read.c \ 10 roff.c tbl.c tbl_opts.c tbl_layout.c tbl_data.c eqn.c 11SRCS+= mdoc_macro.c mdoc.c mdoc_hash.c \ 12 mdoc_argv.c mdoc_state.c mdoc_validate.c att.c msec.c st.c 13SRCS+= man_macro.c man.c man_hash.c man_validate.c 14SRCS+= main.c mdoc_term.c tag.c chars.c term.c tree.c man_term.c eqn_term.c 15SRCS+= mdoc_man.c 16SRCS+= html.c mdoc_html.c man_html.c out.c eqn_html.c 17SRCS+= term_ps.c term_ascii.c tbl_term.c tbl_html.c 18SRCS+= manpath.c mandocdb.c mansearch_const.c mansearch.c 19 20PROG= mandoc 21 22LINKS = ${BINDIR}/mandoc ${BINDIR}/apropos \ 23 ${BINDIR}/mandoc ${BINDIR}/help \ 24 ${BINDIR}/mandoc ${BINDIR}/man \ 25 ${BINDIR}/mandoc ${BINDIR}/whatis \ 26 ${BINDIR}/mandoc /usr/sbin/makewhatis \ 27 ${BINDIR}/mandoc /usr/libexec/makewhatis 28 29MAN = apropos.1 man.1 mandoc.1 man.conf.5 makewhatis.8 30MLINKS= apropos.1 whatis.1 31 32CLEANFILES += man.cgi cgi.o 33 34 35# ---------------------------------------------------------------------- 36# Variables and targets to build and install man.cgi(8), 37# not used during make build and make release. 38 39# To configure, run: cp cgi.h.example cgi.h; vi cgi.h 40# To build, run: make man.cgi 41# To install, run: sudo make installcgi 42# After that, read: man man.cgi.8 43 44LIBMDOC_OBJS = mdoc_argv.o mdoc_hash.o mdoc_macro.o mdoc_state.o \ 45 mdoc_validate.o mdoc.o att.o st.o 46LIBMAN_OBJS = man.o man_hash.o man_macro.o man_validate.o 47LIBROFF_OBJS = roff.o eqn.o tbl.o tbl_data.o tbl_layout.o tbl_opts.o 48LIBMANDOC_OBJS = ${LIBMDOC_OBJS} ${LIBMAN_OBJS} ${LIBROFF_OBJS} \ 49 mandoc.o mandoc_aux.o mandoc_ohash.o \ 50 chars.o msec.o preconv.o read.o 51HTML_OBJS = html.o mdoc_html.o man_html.o tbl_html.o eqn_html.o out.o 52CGI_OBJS = ${LIBMANDOC_OBJS} ${HTML_OBJS} \ 53 mansearch.o mansearch_const.o cgi.o 54 55cgi.o: cgi.h main.h manconf.h mandoc.h mandoc_aux.h mansearch.h \ 56 man.h mdoc.h roff.h 57 58man.cgi: ${CGI_OBJS} 59 ${CC} ${LDFLAGS} ${STATIC} -o ${.TARGET} ${CGI_OBJS} ${LDADD} 60 61installcgi: man.cgi 62 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/var/www/cgi-bin 63 ${INSTALL} ${INSTALL_COPY} -S ${INSTALL_STRIP} \ 64 -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 65 man.cgi ${DESTDIR}/var/www/cgi-bin/man.cgi 66 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/var/www/man/mandoc/man1 67 ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}/var/www/man/mandoc/man8 68 ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \ 69 ${.CURDIR}/apropos.1 ${DESTDIR}/var/www/man/mandoc/man1/apropos.1 70 ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \ 71 ${.CURDIR}/man.cgi.8 ${DESTDIR}/var/www/man/mandoc/man8/man.cgi.8 72 73.include <bsd.prog.mk> 74