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