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}
81 ${_chromebook_platform} \
436 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
440 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
441 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
442 ${MACHINE_CPUARCH} != "mips" && \
443 ${MACHINE_CPUARCH} != "sparc64"
449 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
450 .if exists(${SRCTOP}/sys/opencrypto)
452 _cryptodev= cryptodev
453 _random_fortuna=random_fortuna
454 _random_yarrow= random_yarrow
455 _random_other= random_other
459 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
463 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
470 _ipfw_pmod= ipfw_pmod
471 .if ${MK_IPSEC_SUPPORT} != "no"
476 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
481 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
485 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
486 _ipfw_nat64= ipfw_nat64
490 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
491 _ipfw_nptv6= ipfw_nptv6
494 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
498 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
501 SUBDIR+= iscsi_initiator
508 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
513 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
517 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
518 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
521 .if ${MK_INET_SUPPORT} != "no"
526 .if ${MK_SOURCELESS_UCODE} != "no"
541 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
542 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
543 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv"
547 .if ${MK_TESTS} != "no" || defined(ALL_MODULES)
551 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
555 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
556 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
557 ${MACHINE_CPUARCH} != "riscv"
562 .if ${MACHINE_CPUARCH} != "mips"
563 # no BUS_SPACE_UNSPECIFIED
564 # No barrier instruction support (specific to this driver)
566 # intr_disable() is a macro, causes problems
567 .if ${MK_SOURCELESS_UCODE} != "no"
572 .if ${MACHINE_CPUARCH} == "aarch64"
577 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
583 .if ${MK_SOURCELESS_UCODE} != "no"
601 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
607 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
613 _linprocfs= linprocfs
616 .if ${MK_SOURCELESS_UCODE} != "no"
623 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
637 .if ${MACHINE} != "pc98"
641 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
642 .if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} > 40201
646 _amd_ecc_inject=amd_ecc_inject
655 _chromebook_platform= chromebook_platform
658 .if ${MK_SOURCELESS_HOST} != "no"
662 .if ${MK_SOURCELESS_HOST} != "no"
680 .if ${MK_SOURCELESS_UCODE} != "no"
688 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
693 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
704 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
706 _padlock_rng= padlock_rng
707 _rdrand_rng= rdrand_rng
710 _sdhci_acpi= sdhci_acpi
717 .if ${MK_SOURCELESS_UCODE} != "no"
724 .if ${MACHINE_CPUARCH} == "amd64"
731 _linux_common= linux_common
736 .if ${MK_SOURCELESS_UCODE} != "no"
743 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
748 .if ${MACHINE_CPUARCH} == "i386"
749 # XXX some of these can move to the general case when de-i386'ed
750 # XXX some of these can move now, but are untested on other architectures.
752 _3dfx_linux= 3dfx_linux
756 .if ${MK_SOURCELESS_UCODE} != "no"
760 .if ${MK_SOURCELESS_UCODE} != "no"
779 .if ${MACHINE} == "i386"
780 .if ${MK_EISA} != "no"
784 .if ${MK_SOURCELESS_UCODE} != "no"
790 .elif ${MACHINE} == "pc98"
799 .if ${MACHINE_CPUARCH} == "arm"
804 .if ${MACHINE_CPUARCH} == "powerpc"
814 _nvram= powermac_nvram
820 .if ${MACHINE_ARCH} == "powerpc64"
824 .if ${MACHINE_CPUARCH} == "sparc64"
831 .if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
832 ${MACHINE_CPUARCH} == "i386")
833 _cloudabi32= cloudabi32
835 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
836 _cloudabi64= cloudabi64
841 SUBDIR+=${MODULES_EXTRA}
843 .for reject in ${WITHOUT_MODULES}
844 SUBDIR:= ${SUBDIR:N${reject}}
847 # Calling kldxref(8) for each module is expensive.
848 .if !defined(NO_XREF)
849 .MAKEFLAGS+= -DNO_XREF
851 @if type kldxref >/dev/null 2>&1; then \
852 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
853 kldxref ${DESTDIR}${KMODDIR}; \
857 .include "${SYSDIR}/conf/config.mk"
859 SUBDIR:= ${SUBDIR:u:O}
861 .include <bsd.subdir.mk>