Makefile.bsd-wrapper revision 1.12
1#	$OpenBSD: Makefile.bsd-wrapper,v 1.12 2015/10/27 14:45:52 sthen Exp $
2
3.include <bsd.own.mk>
4
5BINDIR=		/usr/sbin
6CHROOTDIR=	/var/unbound
7USER=		_unbound
8
9XCFLAGS=	CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}"
10
11CONFIGURE_OPTS_UNBOUND=	--enable-allsymbols \
12			--with-ssl=/usr \
13			--with-libevent=/usr \
14			--with-libexpat=/usr \
15			--without-pthreads \
16			--without-pythonmodule \
17			--with-chroot-dir=${CHROOTDIR} \
18			--with-pidfile="" \
19			--with-rootkey-file=/var/unbound/db/root.key \
20			--with-conf-file=${CHROOTDIR}/etc/unbound.conf \
21			--with-username=${USER} \
22			--disable-shared
23
24PROG=	unbound \
25	unbound-anchor \
26	unbound-checkconf \
27	unbound-control \
28	unbound-host
29
30SCRIPT=	unbound-control-setup
31
32MAN=	doc/unbound.8 \
33	doc/unbound.conf.5 \
34	doc/unbound-anchor.8 \
35	doc/unbound-checkconf.8	\
36	doc/unbound-control.8 \
37	doc/unbound-host.1
38
39all:	gnu
40
41.ifndef NOMAN
42${MANALL} ${PSALL}: ${MAN}
43
44${MAN}:	gnu
45.endif
46
47gnu: ${.OBJDIR}/config.status
48	${MAKE}
49
50.FORCE: .IGNORE
51
52config: .FORCE
53	-rm -f ${.OBJDIR}/config.cache
54	cd ${.OBJDIR} && \
55		PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
56		${XCFLAGS} \
57		sh ${.CURDIR}/configure ${CONFIGURE_OPTS_UNBOUND}
58
59${.OBJDIR}/config.status:
60	cd ${.OBJDIR} && \
61		PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
62		${XCFLAGS} \
63		sh ${.CURDIR}/configure ${CONFIGURE_OPTS_UNBOUND}
64
65.ifdef NOMAN
66maninstall:
67	@echo NOMAN is set
68.endif
69
70install: maninstall
71.for file in ${PROG}
72	${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} \
73		-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
74		${file} ${DESTDIR}${BINDIR}
75.endfor
76
77.for file in ${SCRIPT}
78	${INSTALL} ${INSTALL_COPY} \
79		-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
80		${file} ${DESTDIR}${BINDIR}
81.endfor
82
83BEFOREMAN= ${.OBJDIR}/config.status
84CLEANFILES+= ${MAN} dnstap/dnstap_config.h doc/example.conf doc/libunbound.3 \
85		smallapp/unbound-control-setup.sh
86
87clean cleandir:
88	-@if [ -e Makefile ]; then ${MAKE} realclean; fi
89	rm -f ${CLEANFILES}
90
91depend:
92	# Nothing here so far...
93
94lint:
95	# Nothing here so far...
96
97tags:
98	# Nothing here so far...
99
100.include <bsd.obj.mk>
101.include <bsd.subdir.mk>
102.ifndef NOMAN
103.include <bsd.man.mk>
104.endif
105