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}
389 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
393 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
394 .if exists(${.CURDIR}/../opencrypto)
396 _cryptodev= cryptodev
398 .if exists(${.CURDIR}/../crypto)
403 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
407 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
415 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
421 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
425 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
427 SUBDIR+= iscsi_initiator
430 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
435 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
439 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
440 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
443 .if ${MK_INET_SUPPORT} != "no"
448 .if ${MK_SOURCELESS_UCODE} != "no"
460 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
461 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
462 ${MACHINE_ARCH} != "powerpc"
466 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
467 ${MACHINE_CPUARCH} != "powerpc"
472 .if ${MACHINE_CPUARCH} != "mips"
473 # no BUS_SPACE_UNSPECIFIED
474 # No barrier instruction support (specific to this driver)
476 # intr_disable() is a macro, causes problems
477 .if ${MK_SOURCELESS_UCODE} != "no"
482 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
496 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
506 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
512 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
517 _linprocfs= linprocfs
520 .if ${MK_OFED} != "no"
524 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
525 _opensolaris= opensolaris
528 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
542 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
545 .if ${MACHINE} != "pc98"
549 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
559 .if ${MK_SOURCELESS_HOST} != "no"
563 .if ${MK_SOURCELESS_HOST} != "no"
575 .if ${MK_SOURCELESS_UCODE} != "no"
580 .if ${MK_SOURCELESS_UCODE} != "no"
584 .if ${MK_SOURCELESS_UCODE} != "no"
588 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
594 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
602 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
604 _padlock_rng= padlock_rng
605 _rdrand_rng= rdrand_rng
614 .if ${MK_SOURCELESS_UCODE} != "no"
621 .if ${MACHINE_CPUARCH} == "amd64"
625 _linux_common= linux_common
632 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
637 .if ${MACHINE_CPUARCH} == "i386"
638 # XXX some of these can move to the general case when de-i386'ed
639 # XXX some of these can move now, but are untested on other architectures.
641 _3dfx_linux= 3dfx_linux
645 .if ${MK_SOURCELESS_UCODE} != "no"
649 .if ${MK_SOURCELESS_UCODE} != "no"
668 .if ${MACHINE} == "i386"
669 .if ${MK_EISA} != "no"
674 .if ${MK_SOURCELESS_UCODE} != "no"
680 .elif ${MACHINE} == "pc98"
689 .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
715 .if ${MACHINE_ARCH} == "powerpc64"
717 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
722 .if ${MACHINE_CPUARCH} == "sparc64"
727 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
728 _opensolaris= opensolaris
730 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
737 SUBDIR+=${MODULES_EXTRA}
739 .for reject in ${WITHOUT_MODULES}
740 SUBDIR:= ${SUBDIR:N${reject}}
743 # Calling kldxref(8) for each module is expensive.
744 .if !defined(NO_XREF)
745 .MAKEFLAGS+= -DNO_XREF
747 @if type kldxref >/dev/null 2>&1; then \
748 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
749 kldxref ${DESTDIR}${KMODDIR}; \
753 .include "${SYSDIR}/conf/config.mk"
755 SUBDIR:= ${SUBDIR:u:O}
757 .include <bsd.subdir.mk>