4 .include "${SYSDIR}/conf/kern.opts.mk"
8 # Modules that include binary-only blobs of microcode should be selectable by
9 # MK_SOURCELESS_UCODE option (see below).
11 .if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
12 SUBDIR=${MODULES_OVERRIDE}
387 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
391 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
392 .if exists(${.CURDIR}/../opencrypto)
394 _cryptodev= cryptodev
396 .if exists(${.CURDIR}/../crypto)
401 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
405 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
413 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
419 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
423 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
425 SUBDIR+= iscsi_initiator
428 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
433 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
437 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
438 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
441 .if ${MK_INET_SUPPORT} != "no"
446 .if ${MK_SOURCELESS_UCODE} != "no"
458 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
459 ${MACHINE_ARCH} != "powerpc"
463 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
464 ${MACHINE_CPUARCH} != "powerpc"
469 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
470 # no BUS_SPACE_UNSPECIFIED
471 # No barrier instruction support (specific to this driver)
473 # intr_disable() is a macro, causes problems
474 .if ${MK_SOURCELESS_UCODE} != "no"
479 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
493 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
503 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
509 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
514 _linprocfs= linprocfs
517 .if ${MK_OFED} != "no"
521 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
522 _opensolaris= opensolaris
525 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
539 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
542 .if ${MACHINE} != "pc98"
546 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
556 .if ${MK_SOURCELESS_HOST} != "no"
560 .if ${MK_SOURCELESS_HOST} != "no"
572 .if ${MK_SOURCELESS_UCODE} != "no"
577 .if ${MK_SOURCELESS_UCODE} != "no"
581 .if ${MK_SOURCELESS_UCODE} != "no"
585 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
591 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
599 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
601 _padlock_rng= padlock_rng
602 _rdrand_rng= rdrand_rng
611 .if ${MK_SOURCELESS_UCODE} != "no"
618 .if ${MACHINE_CPUARCH} == "amd64"
627 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
632 .if ${MACHINE_CPUARCH} == "i386"
633 # XXX some of these can move to the general case when de-i386'ed
634 # XXX some of these can move now, but are untested on other architectures.
636 _3dfx_linux= 3dfx_linux
640 .if ${MK_SOURCELESS_UCODE} != "no"
644 .if ${MK_SOURCELESS_UCODE} != "no"
663 .if ${MACHINE} == "i386"
664 .if ${MK_EISA} != "no"
669 .if ${MK_SOURCELESS_UCODE} != "no"
675 .elif ${MACHINE} == "pc98"
684 .if ${MACHINE_CPUARCH} == "arm"
689 .if ${MACHINE_CPUARCH} == "powerpc"
698 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
702 _nvram= powermac_nvram
703 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
704 _opensolaris= opensolaris
710 .if ${MACHINE_ARCH} == "powerpc64"
712 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
717 .if ${MACHINE_CPUARCH} == "sparc64"
722 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
723 _opensolaris= opensolaris
725 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
732 SUBDIR+=${MODULES_EXTRA}
734 .for reject in ${WITHOUT_MODULES}
735 SUBDIR:= ${SUBDIR:N${reject}}
738 # Calling kldxref(8) for each module is expensive.
739 .if !defined(NO_XREF)
740 .MAKEFLAGS+= -DNO_XREF
742 @if type kldxref >/dev/null 2>&1; then \
743 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
744 kldxref ${DESTDIR}${KMODDIR}; \
748 .include "${SYSDIR}/conf/config.mk"
750 SUBDIR:= ${SUBDIR:u:O}
752 .include <bsd.subdir.mk>