diff options
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/Makefile | 1 | ||||
-rw-r--r-- | share/mk/bsd.dtb.mk | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/share/mk/Makefile b/share/mk/Makefile index 75b45e8..d0234d8 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -11,6 +11,7 @@ FILES= \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.doc.mk \ + bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ diff --git a/share/mk/bsd.dtb.mk b/share/mk/bsd.dtb.mk new file mode 100644 index 0000000..24e6930 --- /dev/null +++ b/share/mk/bsd.dtb.mk @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir} +.endif +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif + +.include "${SYSDIR}/conf/dtb.mk" + +.include <bsd.sys.mk> |