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}
387 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
391 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
392 .if exists(${.CURDIR}/../opencrypto)
394 _cryptodev= cryptodev
396 .if exists(${.CURDIR}/../crypto)
401 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
405 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
413 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
419 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
423 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
425 SUBDIR+= iscsi_initiator
428 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
433 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
437 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
438 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
441 .if ${MK_INET_SUPPORT} != "no"
446 .if ${MK_SOURCELESS_UCODE} != "no"
458 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
459 ${MACHINE_ARCH} != "powerpc"
463 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
464 ${MACHINE_CPUARCH} != "powerpc"
469 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
470 # no BUS_SPACE_UNSPECIFIED
471 # No barrier instruction support (specific to this driver)
473 # intr_disable() is a macro, causes problems
474 .if ${MK_SOURCELESS_UCODE} != "no"
479 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
493 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
505 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
511 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
516 _linprocfs= linprocfs
519 .if ${MK_OFED} != "no"
523 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
524 _opensolaris= opensolaris
527 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
543 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
546 .if ${MACHINE} != "pc98"
550 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
560 .if ${MK_SOURCELESS_HOST} != "no"
564 .if ${MK_SOURCELESS_HOST} != "no"
576 .if ${MK_SOURCELESS_UCODE} != "no"
581 .if ${MK_SOURCELESS_UCODE} != "no"
585 .if ${MK_SOURCELESS_UCODE} != "no"
589 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
595 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
603 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
605 _padlock_rng= padlock_rng
606 _rdrand_rng= rdrand_rng
615 .if ${MK_SOURCELESS_UCODE} != "no"
622 .if ${MACHINE_CPUARCH} == "amd64"
631 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
636 .if ${MACHINE_CPUARCH} == "i386"
637 # XXX some of these can move to the general case when de-i386'ed
638 # XXX some of these can move now, but are untested on other architectures.
640 _3dfx_linux= 3dfx_linux
644 .if ${MK_SOURCELESS_UCODE} != "no"
648 .if ${MK_SOURCELESS_UCODE} != "no"
667 .if ${MACHINE} == "i386"
668 .if ${MK_EISA} != "no"
673 .if ${MK_SOURCELESS_UCODE} != "no"
679 .elif ${MACHINE} == "pc98"
688 .if ${MACHINE_CPUARCH} == "arm"
694 .if ${MACHINE_CPUARCH} == "powerpc"
703 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
707 _nvram= powermac_nvram
708 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
709 _opensolaris= opensolaris
717 .if ${MACHINE_ARCH} == "powerpc64"
720 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
725 .if ${MACHINE_CPUARCH} == "sparc64"
731 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
732 _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>