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}
86 ${_chromebook_platform} \
422 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
426 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
427 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
428 ${MACHINE_CPUARCH} != "mips" && \
429 ${MACHINE_CPUARCH} != "sparc64"
435 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
436 .if exists(${SRCTOP}/sys/opencrypto)
438 _cryptodev= cryptodev
439 _random_fortuna=random_fortuna
440 _random_yarrow= random_yarrow
441 _random_other= random_other
445 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
449 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
456 _ipfw_pmod= ipfw_pmod
457 .if ${MK_IPSEC_SUPPORT} != "no"
462 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
467 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
471 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
472 _ipfw_nat64= ipfw_nat64
476 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
477 _ipfw_nptv6= ipfw_nptv6
480 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
484 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
487 SUBDIR+= iscsi_initiator
490 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
495 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
499 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
500 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
503 .if ${MK_INET_SUPPORT} != "no"
508 .if ${MK_SOURCELESS_UCODE} != "no"
516 .if ${MACHINE_CPUARCH} != "mips"
524 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
525 ${MACHINE_CPUARCH} != "mips" && \
526 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
527 ${MACHINE_CPUARCH} != "riscv"
531 .if ${MK_TESTS} != "no" || defined(ALL_MODULES)
535 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
539 .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "")
540 _hwpmc_mips24k= hwpmc_mips24k
541 _hwpmc_mips74k= hwpmc_mips74k
544 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
545 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
546 ${MACHINE_CPUARCH} != "riscv"
551 .if ${MACHINE_CPUARCH} != "mips"
552 # no BUS_SPACE_UNSPECIFIED
553 # No barrier instruction support (specific to this driver)
555 # intr_disable() is a macro, causes problems
556 .if ${MK_SOURCELESS_UCODE} != "no"
561 .if ${MACHINE_CPUARCH} == "aarch64"
562 _armv8crypto= armv8crypto
566 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
572 .if ${MK_SOURCELESS_UCODE} != "no"
590 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
595 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
601 _linprocfs= linprocfs
607 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
624 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
627 _amd_ecc_inject=amd_ecc_inject
634 _chromebook_platform= chromebook_platform
637 .if ${MK_SOURCELESS_HOST} != "no"
641 .if ${MK_SOURCELESS_HOST} != "no"
659 .if ${MK_SOURCELESS_UCODE} != "no"
667 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
672 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
677 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
685 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
687 _padlock_rng= padlock_rng
688 _rdrand_rng= rdrand_rng
691 _sdhci_acpi= sdhci_acpi
698 .if ${MK_SOURCELESS_UCODE} != "no"
704 .if ${MACHINE_CPUARCH} == "amd64"
710 _linux_common= linux_common
715 .if ${MK_SOURCELESS_UCODE} != "no"
721 _sgx_linux= sgx_linux
723 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
728 .if ${MACHINE_CPUARCH} == "i386"
729 # XXX some of these can move to the general case when de-i386'ed
730 # XXX some of these can move now, but are untested on other architectures.
732 _3dfx_linux= 3dfx_linux
736 .if ${MK_SOURCELESS_UCODE} != "no"
740 .if ${MK_SOURCELESS_UCODE} != "no"
756 .if ${MK_SOURCELESS_UCODE} != "no"
763 .if ${MACHINE_CPUARCH} == "arm"
768 .if ${MACHINE_CPUARCH} == "powerpc"
783 .if ${MACHINE_ARCH} == "powerpc64"
786 .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc"
787 # Don't build powermac_nvram for powerpcspe, it's never supported.
788 _nvram= powermac_nvram
791 .if ${MACHINE_CPUARCH} == "sparc64"
797 .if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
798 ${MACHINE_CPUARCH} == "i386")
799 _cloudabi32= cloudabi32
801 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
802 _cloudabi64= cloudabi64
807 .if ${MACHINE_ARCH} == "armv6"
811 SUBDIR+=${MODULES_EXTRA}
813 .for reject in ${WITHOUT_MODULES}
814 SUBDIR:= ${SUBDIR:N${reject}}
817 # Calling kldxref(8) for each module is expensive.
818 .if !defined(NO_XREF)
819 .MAKEFLAGS+= -DNO_XREF
821 @if type kldxref >/dev/null 2>&1; then \
822 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
823 kldxref ${DESTDIR}${KMODDIR}; \
827 .include "${SYSDIR}/conf/config.mk"
829 SUBDIR:= ${SUBDIR:u:O}
831 .include <bsd.subdir.mk>