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}
391 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
395 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
396 .if exists(${.CURDIR}/../opencrypto)
398 _cryptodev= cryptodev
402 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
406 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
414 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
419 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
425 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
429 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
431 SUBDIR+= iscsi_initiator
434 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
439 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
443 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
444 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
447 .if ${MK_INET_SUPPORT} != "no"
452 .if ${MK_SOURCELESS_UCODE} != "no"
464 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
465 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
466 ${MACHINE_ARCH} != "powerpc"
470 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
471 ${MACHINE_CPUARCH} != "powerpc"
476 .if ${MACHINE_CPUARCH} != "mips"
477 # no BUS_SPACE_UNSPECIFIED
478 # No barrier instruction support (specific to this driver)
480 # intr_disable() is a macro, causes problems
481 .if ${MK_SOURCELESS_UCODE} != "no"
486 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
500 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
510 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
516 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
521 _linprocfs= linprocfs
524 .if ${MK_OFED} != "no"
528 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
529 _opensolaris= opensolaris
532 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
546 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
549 .if ${MACHINE} != "pc98"
553 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
563 .if ${MK_SOURCELESS_HOST} != "no"
567 .if ${MK_SOURCELESS_HOST} != "no"
579 .if ${MK_SOURCELESS_UCODE} != "no"
584 .if ${MK_SOURCELESS_UCODE} != "no"
588 .if ${MK_SOURCELESS_UCODE} != "no"
592 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
598 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
606 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
608 _padlock_rng= padlock_rng
609 _rdrand_rng= rdrand_rng
618 .if ${MK_SOURCELESS_UCODE} != "no"
625 .if ${MACHINE_CPUARCH} == "amd64"
626 _cloudabi64= cloudabi64
630 _linux_common= linux_common
638 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
643 .if ${MACHINE_CPUARCH} == "i386"
644 # XXX some of these can move to the general case when de-i386'ed
645 # XXX some of these can move now, but are untested on other architectures.
647 _3dfx_linux= 3dfx_linux
651 .if ${MK_SOURCELESS_UCODE} != "no"
655 .if ${MK_SOURCELESS_UCODE} != "no"
674 .if ${MACHINE} == "i386"
675 .if ${MK_EISA} != "no"
680 .if ${MK_SOURCELESS_UCODE} != "no"
686 .elif ${MACHINE} == "pc98"
695 .if ${MACHINE_CPUARCH} == "arm"
700 .if ${MACHINE_CPUARCH} == "powerpc"
709 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
713 _nvram= powermac_nvram
714 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
715 _opensolaris= opensolaris
721 .if ${MACHINE_ARCH} == "powerpc64"
723 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
728 .if ${MACHINE_CPUARCH} == "sparc64"
733 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
734 _opensolaris= opensolaris
736 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
743 SUBDIR+=${MODULES_EXTRA}
745 .for reject in ${WITHOUT_MODULES}
746 SUBDIR:= ${SUBDIR:N${reject}}
749 # Calling kldxref(8) for each module is expensive.
750 .if !defined(NO_XREF)
751 .MAKEFLAGS+= -DNO_XREF
753 @if type kldxref >/dev/null 2>&1; then \
754 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
755 kldxref ${DESTDIR}${KMODDIR}; \
759 .include "${SYSDIR}/conf/config.mk"
761 SUBDIR:= ${SUBDIR:u:O}
763 .include <bsd.subdir.mk>