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}
388 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
392 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
393 .if exists(${.CURDIR}/../opencrypto)
395 _cryptodev= cryptodev
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:C/mips(el)?/mips/} != "mips" && \
458 ${MACHINE_ARCH} != "powerpc"
462 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
463 ${MACHINE_CPUARCH} != "powerpc"
468 .if ${MACHINE_CPUARCH} != "mips"
469 # no BUS_SPACE_UNSPECIFIED
470 # No barrier instruction support (specific to this driver)
472 # intr_disable() is a macro, causes problems
473 .if ${MK_SOURCELESS_UCODE} != "no"
478 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
492 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
502 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
508 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
513 _linprocfs= linprocfs
516 .if ${MK_OFED} != "no"
520 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
521 _opensolaris= opensolaris
524 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
538 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
541 .if ${MACHINE} != "pc98"
545 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
555 .if ${MK_SOURCELESS_HOST} != "no"
559 .if ${MK_SOURCELESS_HOST} != "no"
571 .if ${MK_SOURCELESS_UCODE} != "no"
576 .if ${MK_SOURCELESS_UCODE} != "no"
580 .if ${MK_SOURCELESS_UCODE} != "no"
584 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
590 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
598 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
600 _padlock_rng= padlock_rng
601 _rdrand_rng= rdrand_rng
610 .if ${MK_SOURCELESS_UCODE} != "no"
617 .if ${MACHINE_CPUARCH} == "amd64"
621 _linux_common= linux_common
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"
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
711 .if ${MACHINE_ARCH} == "powerpc64"
713 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
718 .if ${MACHINE_CPUARCH} == "sparc64"
723 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
724 _opensolaris= opensolaris
726 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
733 SUBDIR+=${MODULES_EXTRA}
735 .for reject in ${WITHOUT_MODULES}
736 SUBDIR:= ${SUBDIR:N${reject}}
739 # Calling kldxref(8) for each module is expensive.
740 .if !defined(NO_XREF)
741 .MAKEFLAGS+= -DNO_XREF
743 @if type kldxref >/dev/null 2>&1; then \
744 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
745 kldxref ${DESTDIR}${KMODDIR}; \
749 .include "${SYSDIR}/conf/config.mk"
751 SUBDIR:= ${SUBDIR:u:O}
753 .include <bsd.subdir.mk>