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}
78 ${_chromebook_platform} \
425 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
429 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
430 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
431 ${MACHINE_CPUARCH} != "mips" && \
432 ${MACHINE_CPUARCH} != "sparc64"
438 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
439 .if exists(${SRCTOP}/sys/opencrypto)
441 _cryptodev= cryptodev
442 _random_fortuna=random_fortuna
443 _random_yarrow= random_yarrow
444 _random_other= random_other
448 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
452 .if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES)
453 _tcp_fastpath= tcp/fastpath
456 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
463 _ipfw_pmod= ipfw_pmod
464 .if ${MK_IPSEC_SUPPORT} != "no"
470 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
475 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
479 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
480 _ipfw_nat64= ipfw_nat64
484 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
485 _ipfw_nptv6= ipfw_nptv6
488 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
492 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
495 SUBDIR+= iscsi_initiator
498 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
503 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
507 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
508 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
511 .if ${MK_INET_SUPPORT} != "no"
516 .if ${MK_SOURCELESS_UCODE} != "no"
531 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
532 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
533 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv"
537 .if ${MK_TESTS} != "no" || defined(ALL_MODULES)
541 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
545 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
546 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
547 ${MACHINE_CPUARCH} != "riscv"
552 .if ${MACHINE_CPUARCH} != "mips"
553 # no BUS_SPACE_UNSPECIFIED
554 # No barrier instruction support (specific to this driver)
556 # intr_disable() is a macro, causes problems
557 .if ${MK_SOURCELESS_UCODE} != "no"
562 .if ${MACHINE_CPUARCH} == "aarch64"
567 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
588 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
594 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
600 _linprocfs= linprocfs
606 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
620 .if ${MACHINE} != "pc98"
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"
665 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
671 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
676 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
684 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
686 _padlock_rng= padlock_rng
687 _rdrand_rng= rdrand_rng
690 _sdhci_acpi= sdhci_acpi
697 .if ${MK_SOURCELESS_UCODE} != "no"
704 .if ${MACHINE_CPUARCH} == "amd64"
710 _linux_common= linux_common
719 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
724 .if ${MACHINE_CPUARCH} == "i386"
725 # XXX some of these can move to the general case when de-i386'ed
726 # XXX some of these can move now, but are untested on other architectures.
728 _3dfx_linux= 3dfx_linux
732 .if ${MK_SOURCELESS_UCODE} != "no"
736 .if ${MK_SOURCELESS_UCODE} != "no"
755 .if ${MACHINE} == "i386"
756 .if ${MK_EISA} != "no"
760 .if ${MK_SOURCELESS_UCODE} != "no"
766 .elif ${MACHINE} == "pc98"
775 .if ${MACHINE_CPUARCH} == "arm"
780 .if ${MACHINE_CPUARCH} == "powerpc"
790 _nvram= powermac_nvram
795 .if ${MACHINE_ARCH} == "powerpc64"
799 .if ${MACHINE_CPUARCH} == "sparc64"
806 .if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
807 ${MACHINE_CPUARCH} == "i386")
808 _cloudabi32= cloudabi32
810 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
811 _cloudabi64= cloudabi64
816 SUBDIR+=${MODULES_EXTRA}
818 .for reject in ${WITHOUT_MODULES}
819 SUBDIR:= ${SUBDIR:N${reject}}
822 # Calling kldxref(8) for each module is expensive.
823 .if !defined(NO_XREF)
824 .MAKEFLAGS+= -DNO_XREF
826 @if type kldxref >/dev/null 2>&1; then \
827 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
828 kldxref ${DESTDIR}${KMODDIR}; \
832 .include "${SYSDIR}/conf/config.mk"
834 SUBDIR:= ${SUBDIR:u:O}
836 .include <bsd.subdir.mk>