xref: /freebsd/sys/modules/Makefile (revision 0a897e67548156ed731dae68eafd21728894ef91)
1SYSDIR?=${SRCTOP}/sys
2.include "${SYSDIR}/conf/kern.opts.mk"
3
4SUBDIR_PARALLEL=
5
6# Modules that include binary-only blobs of microcode should be selectable by
7# MK_SOURCELESS_UCODE option (see below).
8
9.include "${SYSDIR}/conf/config.mk"
10
11.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
12SUBDIR=${MODULES_OVERRIDE}
13.else
14SUBDIR=	\
15	${_3dfx} \
16	${_3dfx_linux} \
17	${_aac} \
18	${_aacraid} \
19	accf_data \
20	accf_dns \
21	accf_http \
22	accf_tls \
23	acl_nfs4 \
24	acl_posix1e \
25	${_acpi} \
26	ae \
27	${_aesni} \
28	age \
29	${_agp} \
30	ahci \
31	aic7xxx \
32	alc \
33	ale \
34	alq \
35	${_amd_ecc_inject} \
36	${_amdgpio} \
37	${_amdsbwd} \
38	${_amdsmn} \
39	${_amdtemp} \
40	${_aout} \
41	${_arcmsr} \
42	${_allwinner} \
43	${_armv8crypto} \
44	${_armv8_rng} \
45	${_asmc} \
46	ata \
47	ath \
48	ath_dfs \
49	ath_hal \
50	ath_hal_ar5210 \
51	ath_hal_ar5211 \
52	ath_hal_ar5212 \
53	ath_hal_ar5416 \
54	ath_hal_ar9300 \
55	ath_main \
56	ath_rate \
57	${_autofs} \
58	axgbe \
59	backlight \
60	${_bce} \
61	${_bcm283x_clkman} \
62	${_bcm283x_pwm} \
63	bfe \
64	bge \
65	bhnd \
66	${_bxe} \
67	${_bios} \
68	${_blake2} \
69	${_bnxt} \
70	bridgestp \
71	bwi \
72	bwn \
73	${_bytgpio} \
74	${_chvgpio} \
75	cam \
76	${_cardbus} \
77	${_carp} \
78	cas \
79	${_cbb} \
80	cc \
81	${_ccp} \
82	cd9660 \
83	cd9660_iconv \
84	${_cfi} \
85	${_chromebook_platform} \
86	${_ciss} \
87	${_coretemp} \
88	${_cpsw} \
89	${_cpuctl} \
90	${_cpufreq} \
91	${_crypto} \
92	${_cryptodev} \
93	ctl \
94	${_cxgb} \
95	${_cxgbe} \
96	dc \
97	dcons \
98	dcons_crom \
99	${_dpaa2} \
100	${_dpdk_lpm4} \
101	${_dpdk_lpm6} \
102	${_dpms} \
103	dummymbuf \
104	dummynet \
105	${_dwwdt} \
106	${_e6000sw} \
107	${_efirt} \
108	${_em} \
109	${_ena} \
110	${_enic} \
111	${_enetc} \
112	${_et} \
113	evdev \
114	${_exca} \
115	ext2fs \
116	fdc \
117	fdescfs \
118	${_felix} \
119	${_ffec} \
120	${_fib_dxr} \
121	filemon \
122	firewire \
123	firmware \
124	flash \
125	${_ftgpio} \
126	${_ftwd} \
127	fusefs \
128	${_fxp} \
129	gem \
130	geom \
131	${_glxiic} \
132	${_glxsb} \
133	gpio \
134	${_gve} \
135	hid \
136	hifn \
137	${_hpt27xx} \
138	${_hptiop} \
139	${_hptmv} \
140	${_hptnr} \
141	${_hptrr} \
142	hwpmc \
143	${_hyperv} \
144	i2c \
145	${_iavf} \
146        ${_ibcore} \
147	${_ichwd} \
148	${_ice} \
149	${_ice_ddp} \
150	${_irdma} \
151	${_ida} \
152	if_bridge \
153	${_if_cgem} \
154	if_disc \
155	if_edsc \
156	${_if_enc} \
157	if_epair \
158	${_genet} \
159	${_if_gif} \
160	${_if_gre} \
161	${_if_me} \
162	if_infiniband \
163	if_lagg \
164	if_ovpn \
165	${_if_stf} \
166	if_tuntap \
167	if_vlan \
168	if_vxlan \
169	${_if_wg} \
170	iflib \
171	${_igc} \
172	imgact_binmisc \
173	${_intelspi} \
174	${_io} \
175	${_ioat} \
176        ${_ipoib} \
177	ipdivert \
178	${_ipfilter} \
179	${_ipfw} \
180	ipfw_nat \
181	${_ipfw_nat64} \
182	${_ipfw_nptv6} \
183	${_ipfw_pmod} \
184	${_ipmi} \
185	ip6_mroute_mod \
186	ip_mroute_mod \
187	${_ips} \
188	${_ipsec} \
189	${_ipw} \
190	${_ipwfw} \
191	${_isci} \
192	${_iser} \
193	isp \
194	${_ispfw} \
195	${_itwd} \
196	${_iwi} \
197	${_iwifw} \
198	${_iwlwifi} \
199	${_iwlwififw} \
200	${_iwm} \
201	${_iwmfw} \
202	${_iwn} \
203	${_iwnfw} \
204	${_ix} \
205	${_ixv} \
206	${_ixl} \
207	jme \
208	kbdmux \
209	kgssapi \
210	kgssapi_krb5 \
211	khelp \
212	krpc \
213	ksyms \
214	le \
215	lge \
216	libalias \
217	libiconv \
218	libmchain \
219	lindebugfs \
220	linuxkpi \
221	linuxkpi_hdmi \
222	linuxkpi_video \
223	linuxkpi_wlan \
224	${_lio} \
225	lpt \
226	${_mac_biba} \
227	${_mac_bsdextended} \
228	${_mac_ddb} \
229	${_mac_do} \
230	${_mac_ifoff} \
231	${_mac_ipacl} \
232	${_mac_lomac} \
233	${_mac_mls} \
234	${_mac_none} \
235	${_mac_ntpd} \
236	${_mac_partition} \
237	${_mac_pimd} \
238	${_mac_portacl} \
239	${_mac_priority} \
240	${_mac_seeotheruids} \
241	${_mac_stub} \
242	${_mac_test} \
243	${_mac_veriexec} \
244	${_mac_veriexec_sha1} \
245	${_mac_veriexec_sha256} \
246	${_mac_veriexec_sha384} \
247	${_mac_veriexec_sha512} \
248	${_malo} \
249	${_mana} \
250	md \
251	mdio \
252	${_mgb} \
253	mem \
254	mfi \
255	mii \
256	mlx \
257	mlxfw \
258	${_mlx4} \
259	${_mlx4ib} \
260	${_mlx4en} \
261	${_mlx5} \
262	${_mlx5en} \
263	${_mlx5ib} \
264	mmc \
265	mmcsd \
266	${_mpi3mr} \
267	${_mpr} \
268	${_mps} \
269	mpt \
270	mqueue \
271	mrsas \
272	msdosfs \
273	msdosfs_iconv \
274	msk \
275	${_mthca} \
276	mvs \
277	mwl \
278	${_mwlfw} \
279	mxge \
280	my \
281	${_nctgpio} \
282	${_ncthwm} \
283	${_neta} \
284	netlink \
285	${_netgraph} \
286	${_nfe} \
287	nfscl \
288	nfscommon \
289	nfsd \
290	nfslockd \
291	nfssvc \
292	nlsysevent \
293	nge \
294	nmdm \
295	nullfs \
296	${_ntb} \
297	nvd \
298	${_nvdimm} \
299	nvme \
300	nvmf \
301	${_nvram} \
302	oce \
303	${_ocs_fc} \
304	${_ossl} \
305	otus \
306	${_otusfw} \
307	ow \
308	p9fs \
309	${_padlock} \
310	${_padlock_rng} \
311	${_pchtherm} \
312	${_pcfclock} \
313	${_pf} \
314	${_pflog} \
315	${_pflow} \
316	${_pfsync} \
317	plip \
318	${_pms} \
319	ppbus \
320	ppc \
321	ppi \
322	pps \
323	procfs \
324	proto \
325	pseudofs \
326	${_pst} \
327	pty  \
328	puc \
329	pwm \
330	${_qat} \
331	${_qatfw} \
332	${_qat_c2xxx} \
333	${_qat_c2xxxfw} \
334	${_qlxge} \
335	${_qlxgb} \
336	${_qlxgbe} \
337	${_qlnx} \
338	ral \
339	${_ralfw} \
340	${_random_fortuna} \
341	${_random_other} \
342	rc4 \
343	${_rdma} \
344	${_rdrand_rng} \
345	re \
346	rl \
347	${_rockchip} \
348	rtsx \
349	${_rtw88} \
350	${_rtw89} \
351	rtwn \
352	rtwn_pci \
353	rtwn_usb \
354	${_rtwnfw} \
355	${_s3} \
356	${_safe} \
357	safexcel \
358	${_sbni} \
359	scc \
360	${_sctp} \
361	sdhci \
362	${_sdhci_acpi} \
363	${_sdhci_fdt} \
364	sdhci_pci \
365	sdio \
366	${_sff} \
367	sem \
368	send \
369	${_sfxge} \
370	sge \
371	${_sgx} \
372	${_sgx_linux} \
373	siftr \
374	siis \
375	sis \
376	sk \
377	${_smartpqi} \
378	smbfs \
379	snp \
380	sound \
381	${_speaker} \
382	spi \
383	${_splash} \
384	ste \
385	stge \
386	${_sume} \
387	${_superio} \
388	${_p2sb} \
389	sym \
390	${_syscons} \
391	sysvipc \
392	tarfs \
393	tcp \
394	${_ti} \
395	tmpfs \
396	${_toecore} \
397	tpm \
398	tws \
399	uart \
400	udf \
401	udf_iconv \
402	ufs \
403	uinput \
404	unionfs \
405	usb \
406	${_vesa} \
407	${_vf_i2c} \
408	virtio \
409	vge \
410	${_viawd} \
411	videomode \
412	vkbd \
413	${_vmd} \
414	${_vmm} \
415	${_vmware} \
416	vr \
417	vte \
418	${_wbwd} \
419	${_wdatwd} \
420	wlan \
421	wlan_acl \
422	wlan_amrr \
423	wlan_ccmp \
424	wlan_rssadapt \
425	wlan_tkip \
426	wlan_wep \
427	wlan_xauth \
428	${_wpi} \
429	${_wpifw} \
430	${_x86bios} \
431	xdr \
432	xl \
433	xz \
434	zlib
435
436.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
437_autofs=	autofs
438.endif
439
440.if ${MK_DTRACE} != "no" || defined(ALL_MODULES)
441.if ${KERN_OPTS:MKDTRACE_HOOKS}
442SUBDIR+=	dtrace
443.endif
444SUBDIR+=	opensolaris
445.endif
446
447.if !${MACHINE_ABI:Mlong32}
448_bnxt=		bnxt
449.endif
450
451.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
452.if exists(${SRCTOP}/sys/opencrypto)
453_crypto=	crypto
454_cryptodev=	cryptodev
455_random_fortuna=random_fortuna
456_random_other=	random_other
457.endif
458.endif
459
460.if ${MK_CUSE} != "no" || defined(ALL_MODULES)
461SUBDIR+=	cuse
462.endif
463
464.if ${MK_EFI} != "no"
465.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
466_efirt=		efirt
467.endif
468.endif
469
470.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
471	defined(ALL_MODULES)
472_carp=		carp
473_toecore=	toecore
474_if_enc=	if_enc
475_if_gif=	if_gif
476_if_gre=	if_gre
477.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
478_if_wg=		if_wg
479.endif
480_ipfw_pmod=	ipfw_pmod
481.if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MIPSEC}
482_ipsec=		ipsec
483.endif
484.if ${KERN_OPTS:MSCTP_SUPPORT} || ${KERN_OPTS:MSCTP}
485_sctp=		sctp
486.endif
487.endif
488
489.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
490	defined(ALL_MODULES)
491_if_stf=	if_stf
492.endif
493
494.if (${KERN_OPTS:MINET} && ${MK_INET_SUPPORT} != "no") || defined(ALL_MODULES)
495_if_me=		if_me
496_ipfw=		ipfw
497.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
498_ipfw_nat64=	ipfw_nat64
499.endif
500.endif
501
502.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
503_ipfw_nptv6=	ipfw_nptv6
504.endif
505
506.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
507_ipfilter=	ipfilter
508.endif
509
510.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO} && ${KERN_OPTS:MINET}
511_dpdk_lpm4=	dpdk_lpm4
512_fib_dxr=	fib_dxr
513.endif
514
515.if ${MK_INET6_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO}
516_dpdk_lpm6=	dpdk_lpm6
517.endif
518
519.if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
520SUBDIR+=	cfiscsi
521SUBDIR+=	iscsi
522.endif
523
524.if !empty(OPT_FDT)
525SUBDIR+=	fdt
526.endif
527
528# Linuxulator
529.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
530    ${MACHINE_CPUARCH} == "i386"
531SUBDIR+=	linprocfs
532SUBDIR+=	linsysfs
533.endif
534.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
535SUBDIR+=	linux
536.endif
537.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
538SUBDIR+=	linux64
539SUBDIR+=	linux_common
540.endif
541
542.if ${MACHINE_CPUARCH} != "arm"
543.if ${MK_OFED} != "no" || defined(ALL_MODULES)
544_ibcore=	ibcore
545_ipoib=		ipoib
546_iser=		iser
547_mthca=		mthca
548_rdma=		rdma
549.endif
550.endif
551
552.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
553    ${MACHINE_CPUARCH} == "i386" || ${MACHINE_ARCH:Mpowerpc64*} != ""
554_ipmi=		ipmi
555_mlx4=		mlx4
556_mlx5=		mlx5
557.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
558	defined(ALL_MODULES)
559_mlx4en=	mlx4en
560_mlx5en=	mlx5en
561.endif
562.if ${MK_OFED} != "no" || defined(ALL_MODULES)
563_mlx4ib=	mlx4ib
564_mlx5ib=	mlx5ib
565.endif
566.endif
567
568.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
569    ${MACHINE_CPUARCH} == "i386"
570_ena=		ena
571_gve=		gve
572_iwlwifi=	iwlwifi
573.if ${MK_SOURCELESS_UCODE} != "no"
574_iwlwififw=	iwlwififw
575.endif
576_rtw88=		rtw88
577_rtw89=		rtw89
578_vmware=	vmware
579.endif
580
581.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
582    ${MACHINE_CPUARCH} == "i386" || ${MACHINE_ARCH} == "armv7" || \
583	${MACHINE_ARCH:Mpowerpc64*} != ""
584_ossl=		ossl
585.endif
586
587# MAC framework
588.if ${KERN_OPTS:MMAC} || defined(ALL_MODULES)
589_mac_biba=	mac_biba
590_mac_bsdextended= mac_bsdextended
591.if ${KERN_OPTS:MDDB} || defined(ALL_MODULES)
592_mac_ddb=	mac_ddb
593.endif
594_mac_do=	mac_do
595_mac_ifoff=	mac_ifoff
596_mac_ipacl=	mac_ipacl
597_mac_lomac=	mac_lomac
598_mac_mls=	mac_mls
599_mac_none=	mac_none
600_mac_ntpd=	mac_ntpd
601_mac_partition=	mac_partition
602_mac_pimd=	mac_pimd
603_mac_portacl=	mac_portacl
604_mac_priority=	mac_priority
605_mac_seeotheruids= mac_seeotheruids
606_mac_stub=	mac_stub
607_mac_test=	mac_test
608.if ${MK_VERIEXEC} != "no" || defined(ALL_MODULES)
609_mac_veriexec=	mac_veriexec
610_mac_veriexec_sha1= mac_veriexec_sha1
611_mac_veriexec_sha256= mac_veriexec_sha256
612_mac_veriexec_sha384= mac_veriexec_sha384
613_mac_veriexec_sha512= mac_veriexec_sha512
614.endif
615.endif
616
617.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
618_netgraph=	netgraph
619.endif
620
621.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
622	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
623_pf=		pf
624_pflog=		pflog
625_pflow=		pflow
626.if ${MK_INET_SUPPORT} != "no"
627_pfsync=	pfsync
628.endif
629.endif
630
631.if ${MK_SOURCELESS_UCODE} != "no"
632_bce=		bce
633_fxp=		fxp
634_ispfw=		ispfw
635_ti=		ti
636_mwlfw=		mwlfw
637_otusfw=	otusfw
638_ralfw=		ralfw
639_rtwnfw=	rtwnfw
640.endif
641
642.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
643	${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
644	${MACHINE_CPUARCH} != "riscv"
645_cxgbe=		cxgbe
646.endif
647
648# This has only been tested on amd64 and arm64
649.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64"
650_mpi3mr=mpi3mr
651.endif
652
653# Specific to the Raspberry Pi.
654.if ${MACHINE_CPUARCH} == "aarch64"
655_genet=		genet
656.endif
657
658.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" || \
659	${MACHINE_ARCH:Mpowerpc64*}
660_ice=		ice
661.if ${MK_SOURCELESS_UCODE} != "no"
662_ice_ddp=	ice_ddp
663.endif
664.if ${MK_OFED} != "no" || defined(ALL_MODULES)
665.if ${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no"
666_irdma=		irdma
667.endif
668.endif
669.endif
670
671.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
672	${MACHINE_CPUARCH} == "riscv"
673.if !empty(OPT_FDT)
674_if_cgem=	if_cgem
675.endif
676.endif
677
678# These rely on 64bit atomics
679.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe"
680_mps=		mps
681_mpr=		mpr
682.endif
683
684.if ${MK_TESTS} != "no" || defined(ALL_MODULES)
685SUBDIR+=	ktest
686SUBDIR+=	tests
687.endif
688
689.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
690SUBDIR+=	zfs
691.endif
692
693.if ${MK_SOURCELESS_UCODE} != "no"
694_cxgb=		cxgb
695.endif
696
697.if ${MACHINE_CPUARCH} == "aarch64"
698_armv8crypto=	armv8crypto
699_armv8_rng=	armv8_rng
700_dpaa2=		dpaa2
701_sff=		sff
702_em=		em
703_hyperv=  hyperv
704_vf_i2c=	vf_i2c
705
706.if !empty(OPT_FDT)
707_allwinner=	allwinner
708_dwwdt=		dwwdt
709_enetc=		enetc
710_felix=		felix
711_rockchip=	rockchip
712.endif
713.endif
714
715.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
716.if !empty(OPT_FDT)
717_sdhci_fdt=	sdhci_fdt
718.endif
719_e6000sw=	e6000sw
720_neta=		neta
721.endif
722
723.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
724_agp=		agp
725.if ${MACHINE_CPUARCH} == "i386" || !empty(COMPAT_FREEBSD32_ENABLED)
726_aout=		aout
727.endif
728_bios=		bios
729.if ${MK_SOURCELESS_UCODE} != "no"
730_bxe=		bxe
731.endif
732_cardbus=	cardbus
733_cbb=		cbb
734_cpuctl=	cpuctl
735_cpufreq=	cpufreq
736_dpms=		dpms
737_em=		em
738_et=		et
739_ftgpio=	ftgpio
740_ftwd=		ftwd
741_exca=		exca
742_igc=		igc
743_io=		io
744_itwd=		itwd
745_ix=		ix
746_ixv=		ixv
747.if ${MK_SOURCELESS_UCODE} != "no"
748_lio=		lio
749.endif
750_mana=		mana
751_mgb=		mgb
752_nctgpio=	nctgpio
753_ncthwm=	ncthwm
754_ntb=		ntb
755_ocs_fc=	ocs_fc
756_p2sb=		p2sb
757_qat_c2xxx=	qat_c2xxx
758_qat_c2xxxfw=	qat_c2xxxfw
759_safe=		safe
760_speaker=	speaker
761_splash=	splash
762_syscons=	syscons
763_wbwd=		wbwd
764_wdatwd=	wdatwd
765
766_aac=		aac
767_aacraid=	aacraid
768_acpi=		acpi
769.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
770_aesni=		aesni
771.endif
772_amd_ecc_inject=amd_ecc_inject
773_amdsbwd=	amdsbwd
774_amdsmn=	amdsmn
775_amdtemp=	amdtemp
776_arcmsr=	arcmsr
777_asmc=		asmc
778.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
779_blake2=	blake2
780.endif
781_bytgpio=	bytgpio
782_chvgpio=	chvgpio
783_ciss=		ciss
784_chromebook_platform=	chromebook_platform
785_coretemp=	coretemp
786.if ${MK_SOURCELESS_HOST} != "no" && empty(KCSAN_ENABLED)
787_hpt27xx=	hpt27xx
788.endif
789_hptiop=	hptiop
790.if ${MK_SOURCELESS_HOST} != "no" && empty(KCSAN_ENABLED)
791_hptmv=		hptmv
792_hptnr=		hptnr
793_hptrr=		hptrr
794.endif
795_hyperv=	hyperv
796_ichwd=		ichwd
797_ida=		ida
798_intelspi=	intelspi
799_ips=		ips
800_isci=		isci
801_ipw=		ipw
802_iwi=		iwi
803_iwm=		iwm
804_iwn=		iwn
805.if ${MK_SOURCELESS_UCODE} != "no"
806_ipwfw=		ipwfw
807_iwifw=		iwifw
808_iwmfw=		iwmfw
809_iwnfw=		iwnfw
810.endif
811_nfe=		nfe
812_nvram=		nvram
813.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
814_padlock=	padlock
815_padlock_rng=	padlock_rng
816_rdrand_rng=	rdrand_rng
817.endif
818_pchtherm = pchtherm
819_s3=		s3
820_sdhci_acpi=	sdhci_acpi
821_superio=	superio
822_vesa=		vesa
823_viawd=		viawd
824_vmd=		vmd
825_wpi=		wpi
826.if ${MK_SOURCELESS_UCODE} != "no"
827_wpifw=		wpifw
828.endif
829_x86bios=	x86bios
830.endif
831
832.if ${MACHINE_CPUARCH} == "amd64"
833_amdgpio=	amdgpio
834_ccp=		ccp
835_enic=		enic
836_iavf=		iavf
837_ioat=		ioat
838_ixl=		ixl
839_nvdimm=	nvdimm
840_pms=		pms
841_qat=		qat
842.if ${MK_SOURCELESS_UCODE} != "no"
843_qatfw=		qatfw
844.endif
845_qlxge=		qlxge
846_qlxgb=		qlxgb
847_sume=		sume
848.if ${MK_SOURCELESS_UCODE} != "no"
849_qlxgbe=	qlxgbe
850_qlnx=		qlnx
851.endif
852_sfxge=		sfxge
853_sgx=		sgx
854_sgx_linux=	sgx_linux
855_smartpqi=	smartpqi
856_p2sb=		p2sb
857.endif
858
859.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
860    ${MACHINE_CPUARCH} == "riscv"
861.if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
862.if ${KERN_OPTS:MSMP}
863_vmm=		vmm
864.endif
865.endif
866.endif
867
868.if ${MACHINE_CPUARCH} == "i386"
869# XXX some of these can move to the general case when de-i386'ed
870# XXX some of these can move now, but are untested on other architectures.
871_3dfx=		3dfx
872_3dfx_linux=	3dfx_linux
873_glxiic=	glxiic
874_glxsb=		glxsb
875_pcfclock=	pcfclock
876_pst=		pst
877_sbni=		sbni
878.endif
879
880.if ${MACHINE_ARCH} == "armv7"
881_cfi=		cfi
882_cpsw=		cpsw
883.endif
884
885.if ${MACHINE_CPUARCH} == "powerpc"
886_aacraid=	aacraid
887_agp=		agp
888_an=		an
889_cardbus=	cardbus
890_cbb=		cbb
891_cfi=		cfi
892_cpufreq=	cpufreq
893_exca=		exca
894_ffec=		ffec
895.endif
896
897.if ${MACHINE_ARCH:Mpowerpc64*} != ""
898_ixl=		ixl
899_nvram=		opal_nvram
900.endif
901
902.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe"
903# Don't build powermac_nvram for powerpcspe, it's never supported.
904_nvram+=	powermac_nvram
905.endif
906
907.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64"
908_bcm283x_clkman=  bcm283x_clkman
909_bcm283x_pwm=  bcm283x_pwm
910.endif
911
912.if !(${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 110000)
913# LLVM 10 crashes when building if_malo_pci.c, fixed in LLVM11:
914# https://bugs.llvm.org/show_bug.cgi?id=44351
915_malo=	malo
916.endif
917
918SUBDIR+=${MODULES_EXTRA}
919
920.for reject in ${WITHOUT_MODULES}
921SUBDIR:= ${SUBDIR:N${reject}}
922.endfor
923
924.endif # MODULES_OVERRIDE -- Keep last
925
926# Calling kldxref(8) for each module is expensive.
927.if !defined(NO_XREF)
928.MAKEFLAGS+=	-DNO_XREF
929afterinstall: .PHONY
930	${KLDXREF_CMD} ${DESTDIR}${KMODDIR}
931.if defined(NO_ROOT) && defined(METALOG)
932	echo ".${DISTBASE}${KMODDIR}/linker.hints type=file mode=0644 uname=root gname=wheel" | \
933	    cat -l >> ${METALOG}
934.endif
935.endif
936
937SUBDIR:= ${SUBDIR:u:O}
938
939.include <bsd.subdir.mk>
940