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