xref: /freebsd/share/mk/bsd.dtb.mk (revision c4765af73f3f95c9538228687f0bba2d99737261)
1*c4765af7SWarner Losh# $FreeBSD$
2*c4765af7SWarner Losh
3*c4765af7SWarner Losh# Search for kernel source tree in standard places.
4*c4765af7SWarner Losh.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
5*c4765af7SWarner Losh    ${.CURDIR}/../../../../.. /sys /usr/src/sys
6*c4765af7SWarner Losh.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
7*c4765af7SWarner LoshSYSDIR=	${_dir}
8*c4765af7SWarner Losh.endif
9*c4765af7SWarner Losh.endfor
10*c4765af7SWarner Losh.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
11*c4765af7SWarner Losh    !exists(${SYSDIR}/conf/kmod.mk)
12*c4765af7SWarner Losh.error Unable to locate the kernel source tree. Set SYSDIR to override.
13*c4765af7SWarner Losh.endif
14*c4765af7SWarner Losh
15*c4765af7SWarner Losh.include "${SYSDIR}/conf/dtb.mk"
16*c4765af7SWarner Losh
17*c4765af7SWarner Losh.include <bsd.sys.mk>
18