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}
385 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
389 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
390 .if exists(${.CURDIR}/../opencrypto)
392 _cryptodev= cryptodev
394 .if exists(${.CURDIR}/../crypto)
399 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
403 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
411 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
417 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
421 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
423 SUBDIR+= iscsi_initiator
426 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
431 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
435 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
436 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
439 .if ${MK_INET_SUPPORT} != "no"
444 .if ${MK_SOURCELESS_UCODE} != "no"
456 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
457 ${MACHINE_ARCH} != "powerpc"
461 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
462 ${MACHINE_CPUARCH} != "powerpc"
467 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
468 # no BUS_SPACE_UNSPECIFIED
469 # No barrier instruction support (specific to this driver)
471 # intr_disable() is a macro, causes problems
472 .if ${MK_SOURCELESS_UCODE} != "no"
477 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
491 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
503 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
509 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
512 _linprocfs= linprocfs
515 .if ${MK_OFED} != "no"
519 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
520 _opensolaris= opensolaris
523 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
539 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
542 .if ${MACHINE} != "pc98"
546 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
556 .if ${MK_SOURCELESS_HOST} != "no"
560 .if ${MK_SOURCELESS_HOST} != "no"
572 .if ${MK_SOURCELESS_UCODE} != "no"
577 .if ${MK_SOURCELESS_UCODE} != "no"
581 .if ${MK_SOURCELESS_UCODE} != "no"
586 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
592 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
600 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
602 _padlock_rng= padlock_rng
603 _rdrand_rng= rdrand_rng
612 .if ${MK_SOURCELESS_UCODE} != "no"
619 .if ${MACHINE_CPUARCH} == "amd64"
628 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
633 .if ${MACHINE_CPUARCH} == "i386"
634 # XXX some of these can move to the general case when de-i386'ed
635 # XXX some of these can move now, but are untested on other architectures.
637 _3dfx_linux= 3dfx_linux
641 .if ${MK_SOURCELESS_UCODE} != "no"
645 .if ${MK_SOURCELESS_UCODE} != "no"
664 .if ${MACHINE} == "i386"
665 .if ${MK_EISA} != "no"
670 .if ${MK_SOURCELESS_UCODE} != "no"
676 .elif ${MACHINE} == "pc98"
685 .if ${MACHINE_CPUARCH} == "arm"
691 .if ${MACHINE_CPUARCH} == "powerpc"
700 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
704 _nvram= powermac_nvram
705 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
706 _opensolaris= opensolaris
714 .if ${MACHINE_ARCH} == "powerpc64"
715 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
720 .if ${MACHINE_CPUARCH} == "sparc64"
726 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
727 _opensolaris= opensolaris
731 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
738 .for reject in ${WITHOUT_MODULES}
739 SUBDIR:= ${SUBDIR:N${reject}}
742 # Calling kldxref(8) for each module is expensive.
743 .if !defined(NO_XREF)
744 .MAKEFLAGS+= -DNO_XREF
746 @if type kldxref >/dev/null 2>&1; then \
747 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
748 kldxref ${DESTDIR}${KMODDIR}; \
752 .include <bsd.subdir.mk>