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" || defined(ALL_MODULES)
420 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
424 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
426 SUBDIR+= iscsi_initiator
429 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
434 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
438 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
439 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
442 .if ${MK_INET_SUPPORT} != "no"
447 .if ${MK_SOURCELESS_UCODE} != "no"
459 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
460 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
461 ${MACHINE_ARCH} != "powerpc"
465 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
466 ${MACHINE_CPUARCH} != "powerpc"
471 .if ${MACHINE_CPUARCH} != "mips"
472 # no BUS_SPACE_UNSPECIFIED
473 # No barrier instruction support (specific to this driver)
475 # intr_disable() is a macro, causes problems
476 .if ${MK_SOURCELESS_UCODE} != "no"
481 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
495 .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)
541 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
544 .if ${MACHINE} != "pc98"
548 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
558 .if ${MK_SOURCELESS_HOST} != "no"
562 .if ${MK_SOURCELESS_HOST} != "no"
574 .if ${MK_SOURCELESS_UCODE} != "no"
579 .if ${MK_SOURCELESS_UCODE} != "no"
583 .if ${MK_SOURCELESS_UCODE} != "no"
587 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
593 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
601 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
603 _padlock_rng= padlock_rng
604 _rdrand_rng= rdrand_rng
613 .if ${MK_SOURCELESS_UCODE} != "no"
620 .if ${MACHINE_CPUARCH} == "amd64"
621 _cloudabi64= cloudabi64
625 _linux_common= linux_common
633 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
638 .if ${MACHINE_CPUARCH} == "i386"
639 # XXX some of these can move to the general case when de-i386'ed
640 # XXX some of these can move now, but are untested on other architectures.
642 _3dfx_linux= 3dfx_linux
646 .if ${MK_SOURCELESS_UCODE} != "no"
650 .if ${MK_SOURCELESS_UCODE} != "no"
669 .if ${MACHINE} == "i386"
670 .if ${MK_EISA} != "no"
675 .if ${MK_SOURCELESS_UCODE} != "no"
681 .elif ${MACHINE} == "pc98"
690 .if ${MACHINE_CPUARCH} == "arm"
695 .if ${MACHINE_CPUARCH} == "powerpc"
704 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
708 _nvram= powermac_nvram
709 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
710 _opensolaris= opensolaris
716 .if ${MACHINE_ARCH} == "powerpc64"
718 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
723 .if ${MACHINE_CPUARCH} == "sparc64"
728 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
729 _opensolaris= opensolaris
731 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
738 SUBDIR+=${MODULES_EXTRA}
740 .for reject in ${WITHOUT_MODULES}
741 SUBDIR:= ${SUBDIR:N${reject}}
744 # Calling kldxref(8) for each module is expensive.
745 .if !defined(NO_XREF)
746 .MAKEFLAGS+= -DNO_XREF
748 @if type kldxref >/dev/null 2>&1; then \
749 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
750 kldxref ${DESTDIR}${KMODDIR}; \
754 .include "${SYSDIR}/conf/config.mk"
756 SUBDIR:= ${SUBDIR:u:O}
758 .include <bsd.subdir.mk>