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