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