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}
407 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
411 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
412 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
413 ${MACHINE_CPUARCH} != "mips" && \
414 ${MACHINE_CPUARCH} != "sparc64"
420 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
421 .if exists(${.CURDIR}/../opencrypto)
423 _cryptodev= cryptodev
424 _random_fortuna=random_fortuna
425 _random_yarrow= random_yarrow
426 _random_other= random_other
430 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
434 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
443 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
448 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
454 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
458 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
460 SUBDIR+= iscsi_initiator
463 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
468 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
472 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
473 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
476 .if ${MK_INET_SUPPORT} != "no"
481 .if ${MK_SOURCELESS_UCODE} != "no"
495 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
496 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
497 ${MACHINE_ARCH} != "powerpc"
501 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
505 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
506 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc"
511 .if ${MACHINE_CPUARCH} != "mips"
512 # no BUS_SPACE_UNSPECIFIED
513 # No barrier instruction support (specific to this driver)
515 # intr_disable() is a macro, causes problems
516 .if ${MK_SOURCELESS_UCODE} != "no"
521 .if ${MACHINE_CPUARCH} == "aarch64"
526 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
547 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
553 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
558 _linprocfs= linprocfs
563 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
577 .if ${MACHINE} != "pc98"
581 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
591 .if ${MK_SOURCELESS_HOST} != "no"
595 .if ${MK_SOURCELESS_HOST} != "no"
612 .if ${MK_SOURCELESS_UCODE} != "no"
618 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
624 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
629 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
637 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
639 _padlock_rng= padlock_rng
640 _rdrand_rng= rdrand_rng
649 .if ${MK_SOURCELESS_UCODE} != "no"
656 .if ${MACHINE_CPUARCH} == "amd64"
661 _linux_common= linux_common
669 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
674 .if ${MACHINE_CPUARCH} == "i386"
675 # XXX some of these can move to the general case when de-i386'ed
676 # XXX some of these can move now, but are untested on other architectures.
678 _3dfx_linux= 3dfx_linux
682 .if ${MK_SOURCELESS_UCODE} != "no"
686 .if ${MK_SOURCELESS_UCODE} != "no"
705 .if ${MACHINE} == "i386"
706 .if ${MK_EISA} != "no"
711 .if ${MK_SOURCELESS_UCODE} != "no"
717 .elif ${MACHINE} == "pc98"
726 .if ${MACHINE_CPUARCH} == "arm"
731 .if ${MACHINE_CPUARCH} == "powerpc"
741 _nvram= powermac_nvram
746 .if ${MACHINE_ARCH} == "powerpc64"
750 .if ${MACHINE_CPUARCH} == "sparc64"
757 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
758 _cloudabi64= cloudabi64
763 SUBDIR+=${MODULES_EXTRA}
765 .for reject in ${WITHOUT_MODULES}
766 SUBDIR:= ${SUBDIR:N${reject}}
769 # Calling kldxref(8) for each module is expensive.
770 .if !defined(NO_XREF)
771 .MAKEFLAGS+= -DNO_XREF
773 @if type kldxref >/dev/null 2>&1; then \
774 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
775 kldxref ${DESTDIR}${KMODDIR}; \
779 .include "${SYSDIR}/conf/config.mk"
781 SUBDIR:= ${SUBDIR:u:O}
783 .include <bsd.subdir.mk>