xref: /freebsd/sys/modules/Makefile (revision 5b5b7e2ca2fa9a2418dd51749f4ef6f881ae7179)
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	${_qatfw} \
312	${_qat_c2xxx} \
313	${_qat_c2xxxfw} \
314	${_qlxge} \
315	${_qlxgb} \
316	${_qlxgbe} \
317	${_qlnx} \
318	ral \
319	${_ralfw} \
320	${_random_fortuna} \
321	${_random_other} \
322	rc4 \
323	${_rdma} \
324	${_rdrand_rng} \
325	re \
326	rl \
327	${_rockchip} \
328	rtsx \
329	${_rtw88} \
330	${_rtw88fw} \
331	rtwn \
332	rtwn_pci \
333	rtwn_usb \
334	${_rtwnfw} \
335	${_s3} \
336	${_safe} \
337	safexcel \
338	${_sbni} \
339	scc \
340	${_sctp} \
341	sdhci \
342	${_sdhci_acpi} \
343	${_sdhci_fdt} \
344	sdhci_pci \
345	sdio \
346	sem \
347	send \
348	${_sfxge} \
349	sge \
350	${_sgx} \
351	${_sgx_linux} \
352	siftr \
353	siis \
354	sis \
355	sk \
356	${_smartpqi} \
357	smbfs \
358	snp \
359	sound \
360	${_speaker} \
361	spi \
362	${_splash} \
363	ste \
364	stge \
365	${_sume} \
366	${_superio} \
367	${_p2sb} \
368	sym \
369	${_syscons} \
370	sysvipc \
371	tcp \
372	${_ti} \
373	tmpfs \
374	${_toecore} \
375	${_tpm} \
376	twe \
377	tws \
378	uart \
379	udf \
380	udf_iconv \
381	ufs \
382	uinput \
383	unionfs \
384	usb \
385	${_vesa} \
386	virtio \
387	vge \
388	${_viawd} \
389	videomode \
390	vkbd \
391	${_vmd} \
392	${_vmm} \
393	${_vmware} \
394	vr \
395	vte \
396	${_wbwd} \
397	wlan \
398	wlan_acl \
399	wlan_amrr \
400	wlan_ccmp \
401	wlan_rssadapt \
402	wlan_tkip \
403	wlan_wep \
404	wlan_xauth \
405	${_wpi} \
406	${_wpifw} \
407	${_x86bios} \
408	xdr \
409	xl \
410	xz \
411	zlib
412
413.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
414_autofs=	autofs
415.endif
416
417.if ${MK_DTRACE} != "no" || defined(ALL_MODULES)
418.if ${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != ""
419.if ${KERN_OPTS:MKDTRACE_HOOKS}
420SUBDIR+=	dtrace
421.endif
422.endif
423SUBDIR+=	opensolaris
424.endif
425
426.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
427.if exists(${SRCTOP}/sys/opencrypto)
428_crypto=	crypto
429_cryptodev=	cryptodev
430_random_fortuna=random_fortuna
431_random_other=	random_other
432.endif
433.endif
434
435.if ${MK_CUSE} != "no" || defined(ALL_MODULES)
436SUBDIR+=	cuse
437.endif
438
439.if ${MK_EFI} != "no"
440.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
441_efirt=		efirt
442.endif
443.endif
444
445.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
446	defined(ALL_MODULES)
447_carp=		carp
448_toecore=	toecore
449_if_enc=	if_enc
450_if_gif=	if_gif
451_if_gre=	if_gre
452_ipfw_pmod=	ipfw_pmod
453.if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MIPSEC}
454_ipsec=		ipsec
455.endif
456.if ${KERN_OPTS:MSCTP_SUPPORT} || ${KERN_OPTS:MSCTP}
457_sctp=		sctp
458.endif
459.endif
460
461.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
462	defined(ALL_MODULES)
463_if_stf=	if_stf
464.endif
465
466.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
467_if_me=		if_me
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_qatfw=		qatfw
687_qat_c2xxx=	qat_c2xxx
688_qat_c2xxxfw=	qat_c2xxxfw
689.if ${MK_OFED} != "no" || defined(ALL_MODULES)
690_rdma=		rdma
691.endif
692_safe=		safe
693_speaker=	speaker
694_splash=	splash
695_p2sb=		p2sb
696_wbwd=		wbwd
697
698_aac=		aac
699_aacraid=	aacraid
700_acpi=		acpi
701.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
702_aesni=		aesni
703.endif
704_amd_ecc_inject=amd_ecc_inject
705_amdsbwd=	amdsbwd
706_amdsmn=	amdsmn
707_amdtemp=	amdtemp
708_arcmsr=	arcmsr
709_asmc=		asmc
710.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
711_blake2=	blake2
712.endif
713_bytgpio=	bytgpio
714_chvgpio=	chvgpio
715_ciss=		ciss
716_chromebook_platform=	chromebook_platform
717_coretemp=	coretemp
718.if ${MK_SOURCELESS_HOST} != "no" && empty(KCSAN_ENABLED)
719_hpt27xx=	hpt27xx
720.endif
721_hptiop=	hptiop
722.if ${MK_SOURCELESS_HOST} != "no" && empty(KCSAN_ENABLED)
723_hptmv=		hptmv
724_hptnr=		hptnr
725_hptrr=		hptrr
726.endif
727_hyperv=	hyperv
728_ichwd=		ichwd
729_ida=		ida
730_intelspi=	intelspi
731_ips=		ips
732_isci=		isci
733_ipw=		ipw
734_iwi=		iwi
735_iwm=		iwm
736_iwn=		iwn
737.if ${MK_SOURCELESS_UCODE} != "no"
738_ipwfw=		ipwfw
739_iwifw=		iwifw
740_iwmfw=		iwmfw
741_iwnfw=		iwnfw
742.endif
743_nfe=		nfe
744_nvd=		nvd
745_nvme=		nvme
746_nvram=		nvram
747.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
748_padlock=	padlock
749_padlock_rng=	padlock_rng
750_rdrand_rng=	rdrand_rng
751.endif
752_pchtherm = pchtherm
753_s3=		s3
754_sdhci_acpi=	sdhci_acpi
755_superio=	superio
756_tpm=		tpm
757_vesa=		vesa
758_viawd=		viawd
759_vmd=		vmd
760_wpi=		wpi
761.if ${MK_SOURCELESS_UCODE} != "no"
762_wpifw=		wpifw
763.endif
764_x86bios=	x86bios
765.endif
766
767.if ${MACHINE_CPUARCH} == "amd64"
768_amdgpio=	amdgpio
769_ccp=		ccp
770_iavf=		iavf
771_ioat=		ioat
772_ixl=		ixl
773_nvdimm=	nvdimm
774_pms=		pms
775_qlxge=		qlxge
776_qlxgb=		qlxgb
777_sume=		sume
778.if ${MK_SOURCELESS_UCODE} != "no"
779_qlxgbe=	qlxgbe
780_qlnx=		qlnx
781.endif
782_sfxge=		sfxge
783_sgx=		sgx
784_sgx_linux=	sgx_linux
785_smartpqi=	smartpqi
786_p2sb=		p2sb
787
788.if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
789.if ${KERN_OPTS:MSMP}
790_vmm=		vmm
791.endif
792.endif
793.endif
794
795.if ${MACHINE_CPUARCH} == "i386"
796# XXX some of these can move to the general case when de-i386'ed
797# XXX some of these can move now, but are untested on other architectures.
798_3dfx=		3dfx
799_3dfx_linux=	3dfx_linux
800.if ${MK_SOURCELESS_HOST} != "no"
801_ce=		ce
802.endif
803.if ${MK_SOURCELESS_HOST} != "no"
804_cp=		cp
805.endif
806_glxiic=	glxiic
807_glxsb=		glxsb
808_pcfclock=	pcfclock
809_pst=		pst
810_sbni=		sbni
811.endif
812
813.if ${MACHINE_ARCH} == "armv7"
814_cfi=		cfi
815_cpsw=		cpsw
816.endif
817
818.if ${MACHINE_CPUARCH} == "powerpc"
819_aacraid=	aacraid
820_agp=		agp
821_an=		an
822_cardbus=	cardbus
823_cbb=		cbb
824_cfi=		cfi
825_cpufreq=	cpufreq
826_exca=		exca
827_ffec=		ffec
828_nvd=		nvd
829_nvme=		nvme
830.endif
831
832.if ${MACHINE_ARCH:Mpowerpc64*} != ""
833_ipmi=		ipmi
834_ixl=		ixl
835_nvram=		opal_nvram
836.endif
837.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpcspe"
838# Don't build powermac_nvram for powerpcspe, it's never supported.
839_nvram+=	powermac_nvram
840.endif
841
842.endif
843
844.if ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "aarch64"
845_bcm283x_clkman=  bcm283x_clkman
846_bcm283x_pwm=  bcm283x_pwm
847.endif
848
849.if !(${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 110000)
850# LLVM 10 crashes when building if_malo_pci.c, fixed in LLVM11:
851# https://bugs.llvm.org/show_bug.cgi?id=44351
852_malo=	malo
853.endif
854
855SUBDIR+=${MODULES_EXTRA}
856
857.for reject in ${WITHOUT_MODULES}
858SUBDIR:= ${SUBDIR:N${reject}}
859.endfor
860
861# Calling kldxref(8) for each module is expensive.
862.if !defined(NO_XREF)
863.MAKEFLAGS+=	-DNO_XREF
864afterinstall: .PHONY
865	@if type kldxref >/dev/null 2>&1; then \
866		${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \
867		${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \
868	fi
869.endif
870
871SUBDIR:= ${SUBDIR:u:O}
872
873.include <bsd.subdir.mk>
874