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}
392 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
393 .if exists(${.CURDIR}/../opencrypto)
395 _cryptodev= cryptodev
397 .if exists(${.CURDIR}/../crypto)
402 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
410 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
416 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
420 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
425 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
429 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
430 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
433 .if ${MK_INET_SUPPORT} != "no"
438 .if ${MK_SOURCELESS_UCODE} != "no"
453 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
454 ${MACHINE_CPUARCH} != "powerpc"
459 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
460 # no BUS_SPACE_UNSPECIFIED
461 # No barrier instruction support (specific to this driver)
463 # intr_disable() is a macro, causes problems
464 .if ${MK_SOURCELESS_UCODE} != "no"
469 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
479 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
485 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
495 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
501 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
504 _linprocfs= linprocfs
508 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
509 _opensolaris= opensolaris
512 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
527 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
530 .if ${MACHINE} != "pc98"
534 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
544 .if ${MK_SOURCELESS_HOST} != "no"
548 .if ${MK_SOURCELESS_HOST} != "no"
560 .if ${MK_SOURCELESS_UCODE} != "no"
565 .if ${MK_SOURCELESS_UCODE} != "no"
569 .if ${MK_SOURCELESS_UCODE} != "no"
574 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
580 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
588 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
590 _padlock_rng= padlock_rng
591 _rdrand_rng= rdrand_rng
600 .if ${MK_SOURCELESS_UCODE} != "no"
607 .if ${MACHINE_CPUARCH} == "amd64"
618 .if ${MACHINE_CPUARCH} == "i386"
619 # XXX some of these can move to the general case when de-i386'ed
620 # XXX some of these can move now, but are untested on other architectures.
622 _3dfx_linux= 3dfx_linux
626 .if ${MK_SOURCELESS_UCODE} != "no"
630 .if ${MK_SOURCELESS_UCODE} != "no"
653 .if ${MACHINE} == "i386"
654 .if ${MK_EISA} != "no"
660 .if ${MK_SOURCELESS_UCODE} != "no"
666 .elif ${MACHINE} == "pc98"
675 .if ${MACHINE_CPUARCH} == "arm"
681 .if ${MACHINE_CPUARCH} == "powerpc"
689 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
693 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
697 _nvram= powermac_nvram
698 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
699 _opensolaris= opensolaris
707 .if ${MACHINE_ARCH} == "powerpc64"
708 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
713 .if ${MACHINE_CPUARCH} == "sparc64"
719 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
720 _opensolaris= opensolaris
724 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
731 .for reject in ${WITHOUT_MODULES}
732 SUBDIR:= ${SUBDIR:N${reject}}
735 # Calling kldxref(8) for each module is expensive.
736 .if !defined(NO_XREF)
737 .MAKEFLAGS+= -DNO_XREF
739 @if type kldxref >/dev/null 2>&1; then \
740 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
741 kldxref ${DESTDIR}${KMODDIR}; \
745 .include <bsd.subdir.mk>