Home | History | Annotate | Line # | Download | only in mk
bsd.kernobj.mk revision 1.5
      1 #	$NetBSD: bsd.kernobj.mk,v 1.5 2001/11/27 05:11:41 jmc Exp $
      2 
      3 # KERNSRCDIR	Is the location of the top of the kernel src.
      4 # 		It defaults to ${BSDSRCDIR}/sys, but the top-level
      5 # 		Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
      6 # 		absolute path to the directory where the top-level
      7 # 		Makefile.inc was found.
      8 # 
      9 # KERNARCHDIR	Is the location of the machine dependent kernel
     10 # 		sources.  It defaults to arch/${MACHINE}
     11 # 		
     12 # KERNCONFDIR	Is where the configuration files for kernels are
     13 # 		found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf.
     14 # 
     15 # KERNOBJDIR	Is the kernel build directory.  The kernel GENERIC for
     16 # 		instance will be compiled in ${KERNOBJDIR}/GENERIC.
     17 # 		The default value is
     18 # 		${KERNSRCDIR}/${KERNARCHDIR}/compile
     19 #
     20 #		If MAKEOBJDIRPREFIX or _SRC_TOP_OBJ is set than the value will
     21 #		be either 
     22 #
     23 #		${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
     24 #
     25 #		or
     26 #
     27 #		${_SRC_TOP_OBJ_}/sys/${KERNARCHDIR}/compile
     28 #
     29 #		with MAKEOBJDIRPREFIX taking priority over _SRC_TOP_OBJ_ 
     30 # 
     31 
     32 .include <bsd.own.mk>
     33 
     34 KERNSRCDIR?=	${BSDSRCDIR}/sys
     35 # just incase ${MACHINE} is not always correct
     36 KERNARCHDIR?=	arch/${MACHINE}
     37 
     38 .if defined(MAKEOBJDIRPREFIX)
     39 KERNOBJDIR?=    ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
     40 .else
     41 .if defined(_SRC_TOP_OBJ_) && ${_SRC_TOP_OBJ_} != ""
     42 KERNOBJDIR?=	${_SRC_TOP_OBJ_}/sys/${KERNARCHDIR}/compile
     43 .else
     44 KERNOBJDIR?=	${KERNSRCDIR}/${KERNARCHDIR}/compile
     45 .endif
     46 .endif
     47 
     48 KERNCONFDIR?=	${KERNSRCDIR}/${KERNARCHDIR}/conf
     49