xref: /freebsd/sys/modules/Makefile (revision 6cec9cad762b6476313fb1f8e931a1647822db6b)
1# $FreeBSD$
2
3.include <src.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
10SUBDIR=	\
11	${_3dfx} \
12	${_3dfx_linux} \
13	${_aac} \
14	${_aacraid} \
15	accf_data \
16	accf_dns \
17	accf_http \
18	acl_nfs4 \
19	acl_posix1e \
20	${_acpi} \
21	ae \
22	${_aesni} \
23	age \
24	${_agp} \
25	aha \
26	${_ahb} \
27	ahci \
28	${_aic} \
29	aic7xxx \
30	aio \
31	alc \
32	ale \
33	alq \
34	${_amdsbwd} \
35	${_amdtemp} \
36	amr \
37	${_an} \
38	${_aout} \
39	${_apm} \
40	${_arcmsr} \
41	${_arcnet} \
42	${_asmc} \
43	${_asr} \
44	ata \
45	ath \
46	ath_pci \
47	${_auxio} \
48	${_bce} \
49	bfe \
50	bge \
51	${_bxe} \
52	${_bios} \
53	${_bktr} \
54	${_bm} \
55	bridgestp \
56	bwi \
57	bwn \
58	cam \
59	${_canbepm} \
60	${_canbus} \
61	${_cardbus} \
62	${_carp} \
63	cas \
64	${_cbb} \
65	cc \
66	cd9660 \
67	cd9660_iconv \
68	${_ce} \
69	${_cfi} \
70	${_ciss} \
71	${_cm} \
72	${_cmx} \
73	${_coff} \
74	${_coretemp} \
75	${_cp} \
76	${_cpsw} \
77	${_cpuctl} \
78	${_cpufreq} \
79	${_crypto} \
80	${_cryptodev} \
81	${_cs} \
82	${_ct} \
83	${_ctau} \
84	ctl \
85	${_cxgb} \
86	${_cxgbe} \
87	${_cyclic} \
88	dc \
89	dcons \
90	dcons_crom \
91	de \
92	${_dpms} \
93	${_dpt} \
94	${_drm} \
95	${_drm2} \
96	${_dtrace} \
97	dummynet \
98	${_ed} \
99	${_elink} \
100	${_em} \
101	en \
102	${_ep} \
103	${_epic} \
104	esp \
105	${_et} \
106	${_ex} \
107	${_exca} \
108	${_ext2fs} \
109	${_fatm} \
110	fdc \
111	fdescfs \
112	${_fe} \
113	${_filemon} \
114	firewire \
115	firmware \
116	fuse \
117	${_fxp} \
118	gem \
119	geom \
120	${_glxiic} \
121	${_glxsb} \
122	hatm \
123	hifn \
124	hme \
125	${_hpt27xx} \
126	${_hptiop} \
127	${_hptmv} \
128	${_hptnr} \
129	${_hptrr} \
130	hwpmc \
131	${_hyperv} \
132	${_i2c} \
133        ${_ibcore} \
134	${_ibcs2} \
135	${_ichwd} \
136	${_ida} \
137	${_ie} \
138	if_bridge \
139	if_disc \
140	if_edsc \
141	if_epair \
142	if_faith \
143	if_gif \
144	${_if_gre} \
145	if_lagg \
146	${_if_ndis} \
147	if_stf \
148	if_tap \
149	if_tun \
150	if_vlan \
151	${_igb} \
152	${_iir} \
153	imgact_binmisc \
154	${_io} \
155        ${_ipoib} \
156	${_ipdivert} \
157	${_ipfilter} \
158	${_ipfw} \
159	ipfw_nat \
160	${_ipmi} \
161	ip6_mroute_mod \
162	ip_mroute_mod \
163	${_ips} \
164	${_ipw} \
165	${_ipwfw} \
166	${_isci} \
167	iscsi \
168	iscsi_initiator \
169	isp \
170	${_ispfw} \
171	${_iwi} \
172	${_iwifw} \
173	${_iwn} \
174	${_iwnfw} \
175	${_ixgb} \
176	${_ixgbe} \
177	jme \
178	joy \
179	kbdmux \
180	kgssapi \
181	kgssapi_krb5 \
182	khelp \
183	krpc \
184	ksyms \
185	le \
186	lge \
187	libalias \
188	libiconv \
189	libmbpool \
190	libmchain \
191	${_linprocfs} \
192	${_linsysfs} \
193	${_linux} \
194	lmc \
195	lpt \
196	mac_biba \
197	mac_bsdextended \
198	mac_ifoff \
199	mac_lomac \
200	mac_mls \
201	mac_none \
202	mac_partition \
203	mac_portacl \
204	mac_seeotheruids \
205	mac_stub \
206	mac_test \
207	malo \
208	mcd \
209	md \
210	mem \
211	mfi \
212	mii \
213	mlx \
214	${_mlx4} \
215	${_mlx4ib} \
216	${_mlxen} \
217	${_mly} \
218	mmc \
219	mmcsd \
220	mpr \
221	mps \
222	mpt \
223	mqueue \
224	mrsas \
225	msdosfs \
226	msdosfs_iconv \
227	${_mse} \
228	msk \
229	${_mthca} \
230	mvs \
231	mwl \
232	${_mwlfw} \
233	mxge \
234	my \
235	${_nandfs} \
236	${_nandsim} \
237	${_ncp} \
238	${_ncv} \
239	${_ndis} \
240	netfpga10g \
241	${_netgraph} \
242	${_nfe} \
243	nfs_common \
244	nfscl \
245	nfsclient \
246	nfscommon \
247	nfsd \
248	nfslock \
249	nfslockd \
250	nfsserver \
251	nfssvc \
252	nge \
253	nmdm \
254	${_nsp} \
255	nullfs \
256	${_ntb} \
257	${_nvd} \
258	${_nvme} \
259	${_nvram} \
260	${_nxge} \
261	${_opensolaris} \
262	oce \
263	${_padlock} \
264	patm \
265	${_pccard} \
266	${_pcfclock} \
267	pcn \
268	${_pf} \
269	${_pflog} \
270	${_pfsync} \
271	plip \
272	${_pmc} \
273	ppbus \
274	ppc \
275	ppi \
276	pps \
277	procfs \
278	proto \
279	pseudofs \
280	${_pst} \
281	pty  \
282	puc \
283	${_qlxge} \
284	${_qlxgb} \
285	${_qlxgbe} \
286	ral \
287	${_ralfw} \
288	${_random} \
289	rc4 \
290	${_rdma} \
291	re \
292	reiserfs \
293	rl \
294	${_s3} \
295	${_safe} \
296	${_sbni} \
297	scc \
298	scd \
299	${_scsi_low} \
300	sdhci \
301	sdhci_pci \
302	sem \
303	send \
304	${_sf} \
305	${_sfxge} \
306	sge \
307	siba_bwn \
308	siftr \
309	siis \
310	sis \
311	sk \
312	${_smbfs} \
313	${_sn} \
314	${_snc} \
315	snp \
316	${_sound} \
317	${_speaker} \
318	${_splash} \
319	${_sppp} \
320	ste \
321	${_stg} \
322	stge \
323	${_streams} \
324	${_svr4} \
325	${_sym} \
326	${_syscons} \
327	sysvipc \
328	${_ti} \
329	tl \
330	tmpfs \
331	${_toecore} \
332	${_tpm} \
333	trm \
334	${_twa} \
335	twe \
336	tws \
337	tx \
338	${_txp} \
339	uart \
340	ubsec \
341	udf \
342	udf_iconv \
343	ufs \
344	unionfs \
345	usb \
346	utopia \
347	${_vesa} \
348	${_virtio} \
349	vge \
350	${_viawd} \
351	vkbd \
352	${_vmm} \
353	${_vmware} \
354	${_vpo} \
355	vr \
356	vte \
357	vx \
358	${_vxge} \
359	wb \
360	${_wbwd} \
361	${_wi} \
362	wlan \
363	wlan_acl \
364	wlan_amrr \
365	wlan_ccmp \
366	wlan_rssadapt \
367	wlan_tkip \
368	wlan_wep \
369	wlan_xauth \
370	${_wpi} \
371	${_wpifw} \
372	${_x86bios} \
373	${_xe} \
374	xl \
375	${_zfs} \
376	zlib \
377
378.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
379_filemon=	filemon
380_vmware=	vmware
381.endif
382
383.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \
384	${MACHINE_CPUARCH} != "mips"
385_syscons=	syscons
386_vpo=		vpo
387.endif
388
389.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
390# no BUS_SPACE_UNSPECIFIED
391# No barrier instruction support (specific to this driver)
392_sym=		sym
393# intr_disable() is a macro, causes problems
394.if ${MK_SOURCELESS_UCODE} != "no"
395_cxgb=		cxgb
396.endif
397.endif
398
399.if ${MK_SOURCELESS_UCODE} != "no"
400_cxgbe=		cxgbe
401.endif
402
403.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
404.if exists(${.CURDIR}/../opencrypto)
405_crypto=	crypto
406_cryptodev=	cryptodev
407.endif
408.if exists(${.CURDIR}/../crypto)
409_random=	random
410.endif
411.endif
412
413.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
414	defined(ALL_MODULES)
415_carp=	carp
416_toecore=	toecore
417.endif
418
419.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
420_if_gre=	if_gre
421.endif
422
423.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
424_ipfilter=	ipfilter
425.endif
426
427.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
428_ipdivert=	ipdivert
429_ipfw=		ipfw
430.endif
431
432.if ${MK_NAND} != "no" || defined(ALL_MODULES)
433_nandfs=	nandfs
434_nandsim=	nandsim
435.endif
436
437.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
438_netgraph=	netgraph
439.endif
440
441.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
442	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
443_pf=		pf
444_pflog=		pflog
445.if ${MK_INET_SUPPORT} != "no"
446_pfsync=	pfsync
447.endif
448.endif
449
450.if ${MK_SOURCELESS_UCODE} != "no"
451_bce=		bce
452_fatm=		fatm
453_fxp=		fxp
454_ispfw=		ispfw
455_mwlfw=		mwlfw
456_ralfw=		ralfw
457_sf=		sf
458_sn=		sn
459_ti=		ti
460_txp=		txp
461.endif
462
463.if ${MACHINE_CPUARCH} == "i386"
464# XXX some of these can move to the general case when de-i386'ed
465# XXX some of these can move now, but are untested on other architectures.
466_3dfx=		3dfx
467_3dfx_linux=	3dfx_linux
468_agp=		agp
469_aic=		aic
470_an=		an
471_aout=		aout
472_apm=		apm
473_arcnet=	arcnet
474_bktr=		bktr
475_bxe=		bxe
476_cardbus=	cardbus
477_cbb=		cbb
478.if ${MK_SOURCELESS_UCODE} != "no"
479_ce=		ce
480.endif
481_coff=		coff
482.if ${MK_SOURCELESS_UCODE} != "no"
483_cp=		cp
484.endif
485_cpuctl=	cpuctl
486_cpufreq=	cpufreq
487_cs=		cs
488.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
489_cyclic=	cyclic
490.endif
491_dpms=		dpms
492_drm=		drm
493_drm2=		drm2
494.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
495_dtrace=	dtrace
496.endif
497_ed=		ed
498_elink=		elink
499_em=		em
500_ep=		ep
501_et=		et
502_exca=		exca
503_ext2fs=	ext2fs
504_fe=		fe
505_glxiic=	glxiic
506_glxsb=		glxsb
507_i2c=		i2c
508.if ${MK_OFED} != "no" || defined(ALL_MODULES)
509_ibcore=        ibcore
510.endif
511_ibcs2=		ibcs2
512_ie=		ie
513_if_ndis=	if_ndis
514_igb=		igb
515_io=		io
516.if ${MK_OFED} != "no" || defined(ALL_MODULES)
517_ipoib=         ipoib
518.endif
519_linprocfs=	linprocfs
520_linsysfs=	linsysfs
521_linux=		linux
522_mse=		mse
523.if ${MK_OFED} != "no" || defined(ALL_MODULES)
524_mlx4=		mlx4
525_mlx4ib=	mlx4ib
526_mlxen=		mlxen
527_mthca=		mthca
528.endif
529_ncv=		ncv
530_ndis=		ndis
531_nsp=		nsp
532.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
533_opensolaris=	opensolaris
534.endif
535_pccard=	pccard
536_pcfclock=	pcfclock
537_pst=		pst
538.if ${MK_OFED} != "no" || defined(ALL_MODULES)
539_rdma=		rdma
540.endif
541_safe=		safe
542_sbni=		sbni
543_scsi_low=	scsi_low
544_smbfs=		smbfs
545_sound=		sound
546_speaker=	speaker
547_splash=	splash
548_sppp=		sppp
549_stg=		stg
550_streams=	streams
551_svr4=		svr4
552_vxge=  	vxge
553_wbwd=		wbwd
554_wi=		wi
555_xe=		xe
556.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
557_zfs=		zfs
558.endif
559.if ${MACHINE} == "i386"
560_aac=		aac
561_aacraid=	aacraid
562_acpi=		acpi
563.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
564_aesni=		aesni
565.endif
566.if ${MK_EISA} != "no"
567_ahb=		ahb
568.endif
569_amdsbwd=	amdsbwd
570_amdtemp=	amdtemp
571_arcmsr=	arcmsr
572_asmc=		asmc
573_asr=		asr
574_bios=		bios
575_ciss=		ciss
576_cm=		cm
577_cmx=		cmx
578_coretemp=	coretemp
579.if ${MK_SOURCELESS_UCODE} != "no"
580_ctau=		ctau
581.endif
582_dpt=		dpt
583_ex=		ex
584.if ${MK_SOURCELESS_HOST} != "no"
585_hpt27xx=	hpt27xx
586.endif
587_hptiop=	hptiop
588.if ${MK_SOURCELESS_HOST} != "no"
589_hptmv=		hptmv
590_hptnr=		hptnr
591_hptrr=		hptrr
592.endif
593_hyperv=	hyperv
594_ichwd=		ichwd
595_ida=		ida
596_iir=		iir
597_ipmi=		ipmi
598_ips=		ips
599_ipw=		ipw
600.if ${MK_SOURCELESS_UCODE} != "no"
601_ipwfw=		ipwfw
602.endif
603_isci=		isci
604_iwi=		iwi
605.if ${MK_SOURCELESS_UCODE} != "no"
606_iwifw=		iwifw
607.endif
608_iwn=		iwn
609.if ${MK_SOURCELESS_UCODE} != "no"
610_iwnfw=		iwnfw
611.endif
612_ixgb=		ixgb
613_ixgbe=		ixgbe
614_mly=		mly
615_nfe=		nfe
616_nvd=		nvd
617_nvme=		nvme
618_nvram=		nvram
619_nxge=		nxge
620_tpm=		tpm
621_viawd=		viawd
622_wpi=		wpi
623.if ${MK_SOURCELESS_UCODE} != "no"
624_wpifw=		wpifw
625.endif
626.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
627_padlock=	padlock
628.endif
629_s3=		s3
630_twa=		twa
631_vesa=		vesa
632_virtio=	virtio
633_x86bios=	x86bios
634.elif ${MACHINE} == "pc98"
635_canbepm=	canbepm
636_canbus=	canbus
637_ct=		ct
638_pmc=		pmc
639_snc=		snc
640.endif
641.endif
642
643.if ${MACHINE_CPUARCH} == "amd64"
644_aac=		aac
645_aacraid=	aacraid
646_aout=		aout
647_acpi=		acpi
648.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
649_aesni=		aesni
650.endif
651_agp=		agp
652_an=		an
653_amdsbwd=	amdsbwd
654_amdtemp=	amdtemp
655_arcmsr=	arcmsr
656_asmc=		asmc
657_bktr=		bktr
658_bxe=		bxe
659_cardbus=	cardbus
660_cbb=		cbb
661_cmx=		cmx
662_ciss=		ciss
663_coretemp=	coretemp
664_cpuctl=	cpuctl
665_cpufreq=	cpufreq
666.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
667_cyclic=	cyclic
668.endif
669_dpms=		dpms
670_drm=		drm
671_drm2=		drm2
672.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
673_dtrace=	dtrace
674.endif
675_ed=		ed
676_et=		et
677_em=		em
678_exca=		exca
679_ext2fs=	ext2fs
680.if ${MK_SOURCELESS_HOST} != "no"
681_hpt27xx=	hpt27xx
682.endif
683_hptiop=	hptiop
684.if ${MK_SOURCELESS_HOST} != "no"
685_hptmv=		hptmv
686_hptnr=		hptnr
687_hptrr=		hptrr
688.endif
689_hyperv=	hyperv
690_i2c=		i2c
691.if ${MK_OFED} != "no" || defined(ALL_MODULES)
692_ibcore=        ibcore
693.endif
694_ichwd=		ichwd
695_ida=		ida
696_if_ndis=	if_ndis
697_igb=		igb
698_iir=		iir
699_io=		io
700_ipmi=		ipmi
701.if ${MK_OFED} != "no" || defined(ALL_MODULES)
702_ipoib=         ipoib
703.endif
704_ips=		ips
705_ipw=		ipw
706.if ${MK_SOURCELESS_UCODE} != "no"
707_ipwfw=		ipwfw
708.endif
709_isci=		isci
710_iwi=		iwi
711.if ${MK_SOURCELESS_UCODE} != "no"
712_iwifw=		iwifw
713.endif
714_iwn=		iwn
715.if ${MK_SOURCELESS_UCODE} != "no"
716_iwnfw=		iwnfw
717.endif
718_ixgb=		ixgb
719_ixgbe=		ixgbe
720_linprocfs=	linprocfs
721_linsysfs=	linsysfs
722_linux=		linux
723_mly=		mly
724.if ${MK_OFED} != "no" || defined(ALL_MODULES)
725_mlx4=		mlx4
726_mlx4ib=	mlx4ib
727_mlxen=		mlxen
728_mthca=		mthca
729.endif
730_ndis=		ndis
731_nfe=		nfe
732_ntb=		ntb
733_nvd=		nvd
734_nvme=		nvme
735_nvram=		nvram
736_nxge=		nxge
737.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
738_opensolaris=	opensolaris
739.endif
740.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
741_padlock=	padlock
742.endif
743_pccard=	pccard
744_qlxge=		qlxge
745_qlxgb=		qlxgb
746_qlxgbe=	qlxgbe
747.if ${MK_OFED} != "no" || defined(ALL_MODULES)
748_rdma=		rdma
749.endif
750_s3=		s3
751_safe=		safe
752_scsi_low=	scsi_low
753_sfxge=		sfxge
754_smbfs=		smbfs
755_sound=		sound
756_speaker=	speaker
757_splash=	splash
758_sppp=		sppp
759_tpm=		tpm
760_twa=		twa
761_vesa=		vesa
762_viawd=		viawd
763_virtio=	virtio
764_vmm=		vmm
765_vxge=  	vxge
766_x86bios=	x86bios
767_wbwd=		wbwd
768_wi=		wi
769_wpi=		wpi
770.if ${MK_SOURCELESS_UCODE} != "no"
771_wpifw=		wpifw
772.endif
773.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
774_zfs=		zfs
775.endif
776.endif
777
778.if ${MACHINE_CPUARCH} == "arm"
779_cfi=		cfi
780_cpsw=		cpsw
781.endif
782
783.if ${MACHINE_CPUARCH} == "ia64"
784_aac=		aac
785_aacraid=	aacraid
786_aic=		aic
787_an=		an
788_arcnet=	arcnet
789_asr=		asr
790_bktr=		bktr
791_cardbus=	cardbus
792_cbb=		cbb
793_ciss=		ciss
794_cm=		cm
795_cmx=		cmx
796_coff=		coff
797_cpufreq=	cpufreq
798_dpt=		dpt
799_em=		em
800_ep=		ep
801_et=		et
802_exca=		exca
803_fe=		fe
804_hptiop=	hptiop
805_ida=		ida
806_igb=		igb
807_iir=		iir
808_ips=		ips
809_mly=		mly
810_pccard=	pccard
811_scsi_low=	scsi_low
812_smbfs=		smbfs
813_sound=		sound
814_splash=	splash
815_sppp=		sppp
816_streams=	streams
817_tpm=		tpm
818_twa=		twa
819_wi=		wi
820_xe=		xe
821.endif
822
823.if ${MACHINE_CPUARCH} == "powerpc"
824_agp=		agp
825_an=		an
826_bm=		bm
827_cardbus=	cardbus
828_cbb=		cbb
829_cfi=		cfi
830_cpufreq=	cpufreq
831.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
832_cyclic=	cyclic
833.endif
834_drm=		drm
835.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
836_dtrace=	dtrace
837.endif
838_exca=		exca
839_nvram=		powermac_nvram
840_pccard=	pccard
841_smbfs=		smbfs
842_sound=		sound
843.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
844_opensolaris=	opensolaris
845.endif
846_wi=		wi
847.endif
848
849.if ${MACHINE_ARCH} == "powerpc64"
850.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
851_zfs=		zfs
852.endif
853.endif
854
855.if ${MACHINE_CPUARCH} == "sparc64"
856_auxio=		auxio
857_em=		em
858_epic=		epic
859_i2c=		i2c
860_igb=		igb
861.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
862_opensolaris=	opensolaris
863.endif
864_smbfs=		smbfs
865_sound=		sound
866.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
867_zfs=		zfs
868.endif
869.endif
870
871.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
872SUBDIR=${MODULES_OVERRIDE}
873.endif
874
875.for reject in ${WITHOUT_MODULES}
876SUBDIR:= ${SUBDIR:N${reject}}
877.endfor
878
879# Calling kldxref(8) for each module is expensive.
880.if !defined(NO_XREF)
881.MAKEFLAGS+=	-DNO_XREF
882afterinstall:
883	@if type kldxref >/dev/null 2>&1; then \
884		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
885		kldxref ${DESTDIR}${KMODDIR}; \
886	fi
887.endif
888
889.include <bsd.subdir.mk>
890