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