xref: /freebsd/sys/modules/Makefile (revision a18eacbefdfa1085ca3db829e86ece78cd416493)
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_ichwd=		ichwd
589_ida=		ida
590_iir=		iir
591_ipmi=		ipmi
592_ips=		ips
593_ipw=		ipw
594.if ${MK_SOURCELESS_UCODE} != "no"
595_ipwfw=		ipwfw
596.endif
597_isci=		isci
598_iwi=		iwi
599.if ${MK_SOURCELESS_UCODE} != "no"
600_iwifw=		iwifw
601.endif
602_iwn=		iwn
603.if ${MK_SOURCELESS_UCODE} != "no"
604_iwnfw=		iwnfw
605.endif
606_ixgb=		ixgb
607_ixgbe=		ixgbe
608_mly=		mly
609_nfe=		nfe
610_nvd=		nvd
611.if ${MK_SOURCELESS_HOST} != "no"
612_nve=		nve
613.endif
614_nvme=		nvme
615_nvram=		nvram
616_nxge=		nxge
617_tpm=		tpm
618_viawd=		viawd
619_wpi=		wpi
620.if ${MK_SOURCELESS_UCODE} != "no"
621_wpifw=		wpifw
622.endif
623.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
624_padlock=	padlock
625.endif
626_s3=		s3
627_twa=		twa
628_vesa=		vesa
629_virtio=	virtio
630_x86bios=	x86bios
631.elif ${MACHINE} == "pc98"
632_canbepm=	canbepm
633_canbus=	canbus
634_ct=		ct
635_pmc=		pmc
636_snc=		snc
637.endif
638.endif
639
640.if ${MACHINE_CPUARCH} == "amd64"
641_aac=		aac
642_aacraid=	aacraid
643_aout=		aout
644_acpi=		acpi
645.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
646_aesni=		aesni
647.endif
648_agp=		agp
649_an=		an
650_amdsbwd=	amdsbwd
651_amdtemp=	amdtemp
652_arcmsr=	arcmsr
653_asmc=		asmc
654_bktr=		bktr
655_bxe=		bxe
656_cardbus=	cardbus
657_cbb=		cbb
658_cmx=		cmx
659_ciss=		ciss
660_coretemp=	coretemp
661_cpuctl=	cpuctl
662_cpufreq=	cpufreq
663.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
664_cyclic=	cyclic
665.endif
666_dpms=		dpms
667_drm=		drm
668_drm2=		drm2
669.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
670_dtrace=	dtrace
671.endif
672_ed=		ed
673_et=		et
674_em=		em
675_exca=		exca
676_ext2fs=	ext2fs
677.if ${MK_SOURCELESS_HOST} != "no"
678_hpt27xx=	hpt27xx
679.endif
680_hptiop=	hptiop
681.if ${MK_SOURCELESS_HOST} != "no"
682_hptmv=		hptmv
683_hptnr=		hptnr
684_hptrr=		hptrr
685.endif
686_hyperv=	hyperv
687_i2c=		i2c
688.if ${MK_OFED} != "no" || defined(ALL_MODULES)
689_ibcore=        ibcore
690.endif
691_ichwd=		ichwd
692_ida=		ida
693_if_ndis=	if_ndis
694_igb=		igb
695_iir=		iir
696_io=		io
697_ipmi=		ipmi
698.if ${MK_OFED} != "no" || defined(ALL_MODULES)
699_ipoib=         ipoib
700.endif
701_ips=		ips
702_ipw=		ipw
703.if ${MK_SOURCELESS_UCODE} != "no"
704_ipwfw=		ipwfw
705.endif
706_isci=		isci
707_iwi=		iwi
708.if ${MK_SOURCELESS_UCODE} != "no"
709_iwifw=		iwifw
710.endif
711_iwn=		iwn
712.if ${MK_SOURCELESS_UCODE} != "no"
713_iwnfw=		iwnfw
714.endif
715_ixgb=		ixgb
716_ixgbe=		ixgbe
717_lindev=	lindev
718_linprocfs=	linprocfs
719_linsysfs=	linsysfs
720_linux=		linux
721_mly=		mly
722.if ${MK_OFED} != "no" || defined(ALL_MODULES)
723_mlx4=		mlx4
724_mlx4ib=	mlx4ib
725_mlxen=		mlxen
726_mthca=		mthca
727.endif
728_ndis=		ndis
729_nfe=		nfe
730_ntb=		ntb
731_nvd=		nvd
732.if ${MK_SOURCELESS_HOST} != "no"
733_nve=		nve
734.endif
735_nvme=		nvme
736_nvram=		nvram
737_nxge=		nxge
738.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
739_opensolaris=	opensolaris
740.endif
741.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
742_padlock=	padlock
743.endif
744_pccard=	pccard
745_qlxge=		qlxge
746_qlxgb=		qlxgb
747_qlxgbe=	qlxgbe
748.if ${MK_OFED} != "no" || defined(ALL_MODULES)
749_rdma=		rdma
750.endif
751_s3=		s3
752_safe=		safe
753_scsi_low=	scsi_low
754_sfxge=		sfxge
755_smbfs=		smbfs
756_sound=		sound
757_speaker=	speaker
758_splash=	splash
759_sppp=		sppp
760_tpm=		tpm
761_twa=		twa
762_vesa=		vesa
763_viawd=		viawd
764_virtio=	virtio
765_vmm=		vmm
766_vxge=  	vxge
767_x86bios=	x86bios
768_wbwd=		wbwd
769_wi=		wi
770_wpi=		wpi
771.if ${MK_SOURCELESS_UCODE} != "no"
772_wpifw=		wpifw
773.endif
774.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
775_zfs=		zfs
776.endif
777.endif
778
779.if ${MACHINE_CPUARCH} == "arm"
780_cfi=		cfi
781_cpsw=		cpsw
782.endif
783
784.if ${MACHINE_CPUARCH} == "ia64"
785_aac=		aac
786_aacraid=	aacraid
787_aic=		aic
788_an=		an
789_arcnet=	arcnet
790_asr=		asr
791_bktr=		bktr
792_cardbus=	cardbus
793_cbb=		cbb
794_ciss=		ciss
795_cm=		cm
796_cmx=		cmx
797_coff=		coff
798_cpufreq=	cpufreq
799_dpt=		dpt
800_em=		em
801_ep=		ep
802_et=		et
803_exca=		exca
804_fe=		fe
805_hptiop=	hptiop
806_ida=		ida
807_igb=		igb
808_iir=		iir
809_ips=		ips
810_mly=		mly
811_pccard=	pccard
812_scsi_low=	scsi_low
813_smbfs=		smbfs
814_sound=		sound
815_splash=	splash
816_sppp=		sppp
817_streams=	streams
818_tpm=		tpm
819_twa=		twa
820_wi=		wi
821_xe=		xe
822.endif
823
824.if ${MACHINE_CPUARCH} == "powerpc"
825_agp=		agp
826_an=		an
827_bm=		bm
828_cardbus=	cardbus
829_cbb=		cbb
830_cfi=		cfi
831_cpufreq=	cpufreq
832.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
833_cyclic=	cyclic
834.endif
835_drm=		drm
836.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
837_dtrace=	dtrace
838.endif
839_exca=		exca
840_nvram=		powermac_nvram
841_pccard=	pccard
842_smbfs=		smbfs
843_sound=		sound
844.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
845_opensolaris=	opensolaris
846.endif
847_wi=		wi
848.endif
849
850.if ${MACHINE_ARCH} == "powerpc64"
851.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
852_zfs=		zfs
853.endif
854.endif
855
856.if ${MACHINE_CPUARCH} == "sparc64"
857_auxio=		auxio
858_em=		em
859_epic=		epic
860_i2c=		i2c
861_igb=		igb
862.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
863_opensolaris=	opensolaris
864.endif
865_smbfs=		smbfs
866_sound=		sound
867.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
868_zfs=		zfs
869.endif
870.endif
871
872.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
873SUBDIR=${MODULES_OVERRIDE}
874.endif
875
876.for reject in ${WITHOUT_MODULES}
877SUBDIR:= ${SUBDIR:N${reject}}
878.endfor
879
880# Calling kldxref(8) for each module is expensive.
881.if !defined(NO_XREF)
882.MAKEFLAGS+=	-DNO_XREF
883afterinstall:
884	@if type kldxref >/dev/null 2>&1; then \
885		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
886		kldxref ${DESTDIR}${KMODDIR}; \
887	fi
888.endif
889
890.include <bsd.subdir.mk>
891