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