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}
384 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
389 .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \
390 ${MACHINE_CPUARCH} != "mips"
395 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
396 # no BUS_SPACE_UNSPECIFIED
397 # No barrier instruction support (specific to this driver)
399 # intr_disable() is a macro, causes problems
400 .if ${MK_SOURCELESS_UCODE} != "no"
405 .if ${MK_SOURCELESS_UCODE} != "no"
409 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
410 .if exists(${.CURDIR}/../opencrypto)
412 _cryptodev= cryptodev
414 .if exists(${.CURDIR}/../crypto)
419 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
425 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
429 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
433 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
438 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
443 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
447 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
448 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
451 .if ${MK_INET_SUPPORT} != "no"
456 .if ${MK_SOURCELESS_UCODE} != "no"
469 .if ${MACHINE_CPUARCH} == "i386"
470 # XXX some of these can move to the general case when de-i386'ed
471 # XXX some of these can move now, but are untested on other architectures.
473 _3dfx_linux= 3dfx_linux
484 .if ${MK_SOURCELESS_UCODE} != "no"
488 .if ${MK_SOURCELESS_UCODE} != "no"
494 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
500 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
514 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
522 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
525 _linprocfs= linprocfs
529 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
538 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
539 _opensolaris= opensolaris
544 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
562 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
565 .if ${MACHINE} == "i386"
569 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
572 .if ${MK_EISA} != "no"
585 .if ${MK_SOURCELESS_UCODE} != "no"
590 .if ${MK_SOURCELESS_HOST} != "no"
594 .if ${MK_SOURCELESS_HOST} != "no"
606 .if ${MK_SOURCELESS_UCODE} != "no"
611 .if ${MK_SOURCELESS_UCODE} != "no"
615 .if ${MK_SOURCELESS_UCODE} != "no"
629 .if ${MK_SOURCELESS_UCODE} != "no"
632 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
640 .elif ${MACHINE} == "pc98"
649 .if ${MACHINE_CPUARCH} == "amd64"
654 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
672 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
678 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
686 .if ${MK_SOURCELESS_HOST} != "no"
690 .if ${MK_SOURCELESS_HOST} != "no"
697 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
707 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
712 .if ${MK_SOURCELESS_UCODE} != "no"
717 .if ${MK_SOURCELESS_UCODE} != "no"
721 .if ${MK_SOURCELESS_UCODE} != "no"
726 _linprocfs= linprocfs
730 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
743 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
744 _opensolaris= opensolaris
746 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
753 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
776 .if ${MK_SOURCELESS_UCODE} != "no"
779 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
784 .if ${MACHINE_CPUARCH} == "arm"
790 .if ${MACHINE_CPUARCH} == "powerpc"
798 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
802 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
806 _nvram= powermac_nvram
810 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
811 _opensolaris= opensolaris
816 .if ${MACHINE_ARCH} == "powerpc64"
817 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
822 .if ${MACHINE_CPUARCH} == "sparc64"
828 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
829 _opensolaris= opensolaris
833 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
839 .for reject in ${WITHOUT_MODULES}
840 SUBDIR:= ${SUBDIR:N${reject}}
843 # Calling kldxref(8) for each module is expensive.
844 .if !defined(NO_XREF)
845 .MAKEFLAGS+= -DNO_XREF
847 @if type kldxref >/dev/null 2>&1; then \
848 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
849 kldxref ${DESTDIR}${KMODDIR}; \
853 .include <bsd.subdir.mk>