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"
585 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
591 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
599 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
601 _padlock_rng= padlock_rng
602 _rdrand_rng= rdrand_rng
611 .if ${MK_SOURCELESS_UCODE} != "no"
618 .if ${MACHINE_CPUARCH} == "amd64"
627 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
632 .if ${MACHINE_CPUARCH} == "i386"
633 # XXX some of these can move to the general case when de-i386'ed
634 # XXX some of these can move now, but are untested on other architectures.
636 _3dfx_linux= 3dfx_linux
640 .if ${MK_SOURCELESS_UCODE} != "no"
644 .if ${MK_SOURCELESS_UCODE} != "no"
663 .if ${MACHINE} == "i386"
664 .if ${MK_EISA} != "no"
669 .if ${MK_SOURCELESS_UCODE} != "no"
675 .elif ${MACHINE} == "pc98"
684 .if ${MACHINE_CPUARCH} == "arm"
690 .if ${MACHINE_CPUARCH} == "powerpc"
699 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
703 _nvram= powermac_nvram
704 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
705 _opensolaris= opensolaris
713 .if ${MACHINE_ARCH} == "powerpc64"
716 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
721 .if ${MACHINE_CPUARCH} == "sparc64"
727 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
728 _opensolaris= opensolaris
732 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
739 SUBDIR+=${MODULES_EXTRA}
741 .for reject in ${WITHOUT_MODULES}
742 SUBDIR:= ${SUBDIR:N${reject}}
745 # Calling kldxref(8) for each module is expensive.
746 .if !defined(NO_XREF)
747 .MAKEFLAGS+= -DNO_XREF
749 @if type kldxref >/dev/null 2>&1; then \
750 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
751 kldxref ${DESTDIR}${KMODDIR}; \
755 .include "${SYSDIR}/conf/config.mk"
757 SUBDIR:= ${SUBDIR:u:O}
759 .include <bsd.subdir.mk>