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}
411 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
415 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
416 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
417 ${MACHINE_CPUARCH} != "mips" && \
418 ${MACHINE_CPUARCH} != "sparc64"
424 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
425 .if exists(${.CURDIR}/../opencrypto)
427 _cryptodev= cryptodev
428 _random_fortuna=random_fortuna
429 _random_yarrow= random_yarrow
430 _random_other= random_other
434 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
438 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
447 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
452 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
458 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
462 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
464 SUBDIR+= iscsi_initiator
467 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
472 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
476 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
477 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
480 .if ${MK_INET_SUPPORT} != "no"
485 .if ${MK_SOURCELESS_UCODE} != "no"
499 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
500 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
501 ${MACHINE_ARCH} != "powerpc"
505 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
509 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
510 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc"
515 .if ${MACHINE_CPUARCH} != "mips"
516 # no BUS_SPACE_UNSPECIFIED
517 # No barrier instruction support (specific to this driver)
519 # intr_disable() is a macro, causes problems
520 .if ${MK_SOURCELESS_UCODE} != "no"
525 .if ${MACHINE_CPUARCH} == "aarch64"
530 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
551 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
557 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
562 _linprocfs= linprocfs
568 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
582 .if ${MACHINE} != "pc98"
586 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
596 .if ${MK_SOURCELESS_HOST} != "no"
600 .if ${MK_SOURCELESS_HOST} != "no"
617 .if ${MK_SOURCELESS_UCODE} != "no"
623 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
629 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
634 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
642 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
644 _padlock_rng= padlock_rng
645 _rdrand_rng= rdrand_rng
654 .if ${MK_SOURCELESS_UCODE} != "no"
661 .if ${MACHINE_CPUARCH} == "amd64"
666 _linux_common= linux_common
674 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
679 .if ${MACHINE_CPUARCH} == "i386"
680 # XXX some of these can move to the general case when de-i386'ed
681 # XXX some of these can move now, but are untested on other architectures.
683 _3dfx_linux= 3dfx_linux
687 .if ${MK_SOURCELESS_UCODE} != "no"
691 .if ${MK_SOURCELESS_UCODE} != "no"
710 .if ${MACHINE} == "i386"
711 .if ${MK_EISA} != "no"
716 .if ${MK_SOURCELESS_UCODE} != "no"
722 .elif ${MACHINE} == "pc98"
731 .if ${MACHINE_CPUARCH} == "arm"
736 .if ${MACHINE_ARCH} == "armv6"
740 .if ${MACHINE_CPUARCH} == "powerpc"
750 _nvram= powermac_nvram
755 .if ${MACHINE_ARCH} == "powerpc64"
759 .if ${MACHINE_CPUARCH} == "sparc64"
766 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
767 _cloudabi64= cloudabi64
772 SUBDIR+=${MODULES_EXTRA}
774 .for reject in ${WITHOUT_MODULES}
775 SUBDIR:= ${SUBDIR:N${reject}}
778 # Calling kldxref(8) for each module is expensive.
779 .if !defined(NO_XREF)
780 .MAKEFLAGS+= -DNO_XREF
782 @if type kldxref >/dev/null 2>&1; then \
783 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
784 kldxref ${DESTDIR}${KMODDIR}; \
788 .include "${SYSDIR}/conf/config.mk"
790 SUBDIR:= ${SUBDIR:u:O}
792 .include <bsd.subdir.mk>