1# $OpenBSD: Makefile.bsd-wrapper,v 1.8 2014/03/21 00:23:15 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=/var/run/unbound.pid \ 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 INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \ 58 sh ${.CURDIR}/configure ${CONFIGURE_OPTS_UNBOUND} 59 if [ ! -e ${.OBJDIR}/doc/unbound-host.1 ]; then \ 60 cp ${.CURDIR}/doc/unbound-host.1 \ 61 ${.OBJDIR}/doc/unbound-host.1; \ 62 fi 63 64${.OBJDIR}/config.status: 65 cd ${.OBJDIR} && \ 66 PATH="/bin:/usr/bin:/sbin:/usr/sbin" \ 67 ${XCFLAGS} \ 68 INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \ 69 sh ${.CURDIR}/configure ${CONFIGURE_OPTS_UNBOUND} 70 if [ ! -e ${.OBJDIR}/doc/unbound-host.1 ]; then \ 71 cp ${.CURDIR}/doc/unbound-host.1 \ 72 ${.OBJDIR}/doc/unbound-host.1; \ 73 fi 74 75.ifdef NOMAN 76maninstall: 77 @echo NOMAN is set 78.endif 79 80install: maninstall 81.for file in ${PROG} 82 ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} \ 83 -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 84 ${file} ${DESTDIR}${BINDIR} 85.endfor 86 87.for file in ${SCRIPT} 88 ${INSTALL} ${INSTALL_COPY} \ 89 -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 90 ${file} ${DESTDIR}${BINDIR} 91.endfor 92 93BEFOREMAN= ${.OBJDIR}/config.status 94CLEANFILES+= ${MAN} doc/example.conf doc/libunbound.3 95 96clean cleandir: 97 -@if [ -e Makefile ]; then ${MAKE} realclean; fi 98 rm -f ${CLEANFILES} 99 100depend: 101 # Nothing here so far... 102 103lint: 104 # Nothing here so far... 105 106tags: 107 # Nothing here so far... 108 109.include <bsd.obj.mk> 110.include <bsd.subdir.mk> 111.ifndef NOMAN 112.include <bsd.man.mk> 113.endif 114