diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1677,14 +1677,13 @@ KERNCONF=${KERNFAST} .endif .endif -.if ${TARGET_ARCH} == "powerpc64" -KERNCONF?= GENERIC64 -.elif ${TARGET_ARCH} == "powerpc64le" -KERNCONF?= GENERIC64LE -.elif ${TARGET_ARCH} == "powerpcspe" -KERNCONF?= MPC85XXSPE +GENERIC_KERNCONF_SUFX_powerpc64= 64 +GENERIC_KERNCONF_SUFX_powerpc64le= 64LE +GENERIC_KERNCONF_powerpcspe= MPC85XXSPE +.if defined(GENERIC_KERNCONF_${TARGET_ARCH}) +GENERIC_KERNCONF?= ${KERNCONF_${TARGET_ARCH}} .else -KERNCONF?= GENERIC +GENERIC_KERNCONF?= GENERIC${GENERIC_KERNCONF_SUFX_${TARGET_ARCH}} .endif INSTKERNNAME?= kernel @@ -1693,6 +1692,24 @@ KRNLOBJDIR= ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} KERNCONFDIR?= ${KRNLCONFDIR} +.for _k in ${GENERIC_KERNCONF} MINIMAL${GENERIC_KERNCONF_SUFX_${TARGET_ARCH}} ${GENERIC_KERNCONF}-MMCCAM +.if exists(${KERNCONFDIR}/${_k}) +PKG_KERNCONF+= ${_k} +.for _dbg in NODEBUG DEBUG +.if exists(${KERNCONFDIR}/${_k}-${_dbg}) +PKG_KERNCONF+= ${_k}-${_dbg} +.endif +.endfor +.endif +.endfor + +.if defined(PACKAGE_BUILDING) +KERNCONF?= ${PKG_KERNCONF} +.else +KERNCONF?= ${GENERIC_KERNCONF} +.endif +.error "${KERNCONF}" + BUILDKERNELS= INSTALLKERNEL= .if defined(NO_INSTALLKERNEL)