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