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