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