2001-11-27 08:39:03 +03:00
|
|
|
# $NetBSD: bsd.kernobj.mk,v 1.7 2001/11/27 05:39:03 jmc Exp $
|
2000-05-02 07:43:15 +04:00
|
|
|
|
2000-05-07 05:20:47 +04:00
|
|
|
# KERNSRCDIR Is the location of the top of the kernel src.
|
|
|
|
# It defaults to ${BSDSRCDIR}/sys, but the top-level
|
|
|
|
# Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
|
|
|
|
# absolute path to the directory where the top-level
|
|
|
|
# Makefile.inc was found.
|
|
|
|
#
|
|
|
|
# KERNARCHDIR Is the location of the machine dependent kernel
|
|
|
|
# sources. It defaults to arch/${MACHINE}
|
|
|
|
#
|
|
|
|
# KERNCONFDIR Is where the configuration files for kernels are
|
|
|
|
# found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf.
|
|
|
|
#
|
|
|
|
# KERNOBJDIR Is the kernel build directory. The kernel GENERIC for
|
|
|
|
# instance will be compiled in ${KERNOBJDIR}/GENERIC.
|
|
|
|
# The default value is
|
2001-11-27 08:39:03 +03:00
|
|
|
# ${KERNSRCDIR}/${KERNARCHDIR}/compile
|
|
|
|
#
|
|
|
|
# If MAKEOBJDIRPREFIX or _SRC_TOP_OBJ is set than the value will
|
|
|
|
# be either
|
|
|
|
#
|
|
|
|
# ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
|
|
|
|
#
|
|
|
|
# or
|
|
|
|
#
|
|
|
|
# ${_SRC_TOP_OBJ_}/sys/${KERNARCHDIR}/compile
|
|
|
|
#
|
|
|
|
# with MAKEOBJDIRPREFIX taking priority over _SRC_TOP_OBJ_
|
2000-05-07 05:20:47 +04:00
|
|
|
#
|
2000-05-02 07:43:15 +04:00
|
|
|
|
2001-11-27 08:39:03 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2000-05-02 07:43:15 +04:00
|
|
|
KERNSRCDIR?= ${BSDSRCDIR}/sys
|
|
|
|
# just incase ${MACHINE} is not always correct
|
|
|
|
KERNARCHDIR?= arch/${MACHINE}
|
|
|
|
|
2001-11-27 08:39:03 +03:00
|
|
|
#
|
|
|
|
# XXX It's ugly but it does what we need here. If making objects use the above
|
|
|
|
# rules for trying to figure out a KERNOBJDIR.
|
|
|
|
#
|
|
|
|
# When coming back through here in rules (such as building kernels for
|
|
|
|
# a release), check which vars we're using and which directory base has been
|
|
|
|
# made in the previous obj stage to figure out which one to expose.
|
|
|
|
#
|
|
|
|
# All cases will fall through to the ${KERNSRCDIR}/${KERNARCHDIR}/compile case
|
|
|
|
# if nothing ends up setting this.
|
|
|
|
.if make(obj) || \
|
|
|
|
(defined(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile)) || \
|
|
|
|
(defined(_SRC_TOP_OBJ_) && exists(${_SRC_TOP_OBJ_}/sys/${KERNARCHDIR}/compile))
|
|
|
|
.if defined (MAKEOBJDIRPREFIX)
|
|
|
|
KERNOBJDIR?= ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
|
2000-05-02 07:43:15 +04:00
|
|
|
.else
|
2001-11-27 08:39:03 +03:00
|
|
|
.if defined(_SRC_TOP_OBJ_) && ${_SRC_TOP_OBJ_} != ""
|
|
|
|
KERNOBJDIR?= ${_SRC_TOP_OBJ_}/sys/${KERNARCHDIR}/compile
|
|
|
|
.endif
|
|
|
|
.endif
|
2000-05-02 07:43:15 +04:00
|
|
|
.endif
|
2001-11-27 08:39:03 +03:00
|
|
|
|
|
|
|
KERNOBJDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/compile
|
|
|
|
|
2000-05-02 07:43:15 +04:00
|
|
|
KERNCONFDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/conf
|