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