diff --git a/Makefile.inc1 b/Makefile.inc1 index c768b0ada916..2ba26504cd65 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -82,7 +82,7 @@ SUBDIR+= usr.sbin .if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) SUBDIR+= secure .endif -.if exists(lkm) && !defined(NOLKM) +.if exists(lkm) && !defined(NOLKM) && ${OBJFORMAT} == "aout" SUBDIR+= lkm .endif @@ -741,7 +741,7 @@ _perl= gnu/usr.bin/perl/miniperl .if !defined(NOSHARE) && exists(${.CURDIR}/share) _scrnmaps= share/syscons/scrnmaps .endif -.if !defined(NOLKM) && exists(${.CURDIR}/lkm) +.if !defined(NOLKM) && exists(${.CURDIR}/lkm) && ${OBJFORMAT} == "aout" _linux= lkm/linux .endif .if ${OBJFORMAT} == "aout"