Added bsd.kernobj.mk to centralize the magic for the location

of kernel configs and compiles.  Relies on BSDSRCDIR being set
which is now handled by src/Makefile.inc if need be.
This commit is contained in:
sjg 2000-05-02 03:43:15 +00:00
parent 712326ecbd
commit a434bb7045
2 changed files with 28 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 1999/09/14 01:31:11 perry Exp $
# $NetBSD: Makefile,v 1.28 2000/05/02 03:43:15 sjg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/8/93
.include <bsd.own.mk>
@ -6,7 +6,7 @@
.if ${MKSHARE} != "no"
FILES= bsd.README bsd.crypto.mk bsd.doc.mk bsd.dep.mk \
bsd.depall.mk bsd.files.mk bsd.hostprog.mk \
bsd.inc.mk bsd.info.mk bsd.kinc.mk bsd.kmod.mk \
bsd.inc.mk bsd.info.mk bsd.kernobj.mk bsd.kinc.mk bsd.kmod.mk \
bsd.lib.mk bsd.links.mk bsd.man.mk bsd.nls.mk \
bsd.obj.mk bsd.own.mk bsd.prog.mk \
bsd.subdir.mk bsd.sys.mk sys.mk

26
share/mk/bsd.kernobj.mk Normal file
View File

@ -0,0 +1,26 @@
# $NetBSD: bsd.kernobj.mk,v 1.1 2000/05/02 03:43:15 sjg Exp $
# KERNSRCDIR points to kernel source; it is set by default to ../sys,
# but can be overridden.
# KERNARCHDIR is the directory under kernel source that holds the md
# stuff. Default is arch/${MACHINE}.
# KERNOBJDIR is the kernel build directory, it defaults to
# ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile/KERNELNAME
# if ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
# exists otherwise it defaults to
# ${KERNSRCDIR}/${KERNARCHDIR}/compile/KERNELNAME, but can be
# overridden. Or
# KERNCONFDIR is where the configuration files for kernels are found;
# default is ${KERNSRCDIR}/${KERNARCHDIR}/conf but can be overridden.
# we need a top level Makefile.inc to set BSDSRCDIR
KERNSRCDIR?= ${BSDSRCDIR}/sys
# just incase ${MACHINE} is not always correct
KERNARCHDIR?= arch/${MACHINE}
.if exists(${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile)
KERNOBJDIR?= ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
.else
KERNOBJDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/compile
.endif
KERNCONFDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/conf