xref: /freebsd/sys/modules/Makefile (revision 3ae0125a99dc29a8f8ca9ba933825e2447b54c6b)
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_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	${_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	${_nvme} \
255	${_nvram} \
256	${_nxge} \
257	${_opensolaris} \
258	oce \
259	${_padlock} \
260	patm \
261	${_pccard} \
262	${_pcfclock} \
263	pcn \
264	${_pf} \
265	${_pflog} \
266	${_pfsync} \
267	plip \
268	${_pmc} \
269	ppbus \
270	ppc \
271	ppi \
272	pps \
273	procfs \
274	pseudofs \
275	${_pst} \
276	pty  \
277	puc \
278	${_qlxge} \
279	${_qlxgb} \
280	${_qlxgbe} \
281	ral \
282	${_ralfw} \
283	${_random} \
284	rc4 \
285	${_rdma} \
286	re \
287	reiserfs \
288	rl \
289	${_s3} \
290	${_safe} \
291	${_sbni} \
292	scc \
293	scd \
294	${_scsi_low} \
295	sdhci \
296	sdhci_pci \
297	sem \
298	send \
299	${_sf} \
300	${_sfxge} \
301	sge \
302	siba_bwn \
303	siftr \
304	siis \
305	sis \
306	sk \
307	${_smbfs} \
308	${_sn} \
309	${_snc} \
310	snp \
311	${_sound} \
312	${_speaker} \
313	${_splash} \
314	${_sppp} \
315	ste \
316	${_stg} \
317	stge \
318	${_streams} \
319	${_svr4} \
320	${_sym} \
321	${_syscons} \
322	sysvipc \
323	${_ti} \
324	tl \
325	tmpfs \
326	${_toecore} \
327	${_tpm} \
328	trm \
329	${_twa} \
330	twe \
331	tws \
332	tx \
333	${_txp} \
334	uart \
335	ubsec \
336	udf \
337	udf_iconv \
338	ufs \
339	unionfs \
340	usb \
341	utopia \
342	${_vesa} \
343	${_virtio} \
344	vge \
345	${_viawd} \
346	vkbd \
347	${_vmm} \
348	${_vmware} \
349	${_vpo} \
350	vr \
351	vte \
352	vx \
353	${_vxge} \
354	wb \
355	${_wbwd} \
356	${_wi} \
357	wlan \
358	wlan_acl \
359	wlan_amrr \
360	wlan_ccmp \
361	wlan_rssadapt \
362	wlan_tkip \
363	wlan_wep \
364	wlan_xauth \
365	${_wpi} \
366	${_wpifw} \
367	${_x86bios} \
368	${_xe} \
369	xl \
370	${_zfs} \
371	zlib \
372
373.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
374_filemon=	filemon
375_imgact_binmisc=	imgact_binmisc
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_nvme=		nvme
613_nvram=		nvram
614_nxge=		nxge
615_tpm=		tpm
616_viawd=		viawd
617_wpi=		wpi
618.if ${MK_SOURCELESS_UCODE} != "no"
619_wpifw=		wpifw
620.endif
621.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
622_padlock=	padlock
623.endif
624_s3=		s3
625_twa=		twa
626_vesa=		vesa
627_virtio=	virtio
628_x86bios=	x86bios
629.elif ${MACHINE} == "pc98"
630_canbepm=	canbepm
631_canbus=	canbus
632_ct=		ct
633_pmc=		pmc
634_snc=		snc
635.endif
636.endif
637
638.if ${MACHINE_CPUARCH} == "amd64"
639_aac=		aac
640_aacraid=	aacraid
641_aout=		aout
642_acpi=		acpi
643.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
644_aesni=		aesni
645.endif
646_agp=		agp
647_an=		an
648_amdsbwd=	amdsbwd
649_amdtemp=	amdtemp
650_arcmsr=	arcmsr
651_asmc=		asmc
652_bktr=		bktr
653_bxe=		bxe
654_cardbus=	cardbus
655_cbb=		cbb
656_cmx=		cmx
657_ciss=		ciss
658_coretemp=	coretemp
659_cpuctl=	cpuctl
660_cpufreq=	cpufreq
661.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
662_cyclic=	cyclic
663.endif
664_dpms=		dpms
665_drm=		drm
666_drm2=		drm2
667.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
668_dtrace=	dtrace
669.endif
670_ed=		ed
671_et=		et
672_em=		em
673_exca=		exca
674_ext2fs=	ext2fs
675.if ${MK_SOURCELESS_HOST} != "no"
676_hpt27xx=	hpt27xx
677.endif
678_hptiop=	hptiop
679.if ${MK_SOURCELESS_HOST} != "no"
680_hptmv=		hptmv
681_hptnr=		hptnr
682_hptrr=		hptrr
683.endif
684_hyperv=	hyperv
685_i2c=		i2c
686.if ${MK_OFED} != "no" || defined(ALL_MODULES)
687_ibcore=        ibcore
688.endif
689_ichwd=		ichwd
690_ida=		ida
691_if_ndis=	if_ndis
692_igb=		igb
693_iir=		iir
694_io=		io
695_ipmi=		ipmi
696.if ${MK_OFED} != "no" || defined(ALL_MODULES)
697_ipoib=         ipoib
698.endif
699_ips=		ips
700_ipw=		ipw
701.if ${MK_SOURCELESS_UCODE} != "no"
702_ipwfw=		ipwfw
703.endif
704_isci=		isci
705_iwi=		iwi
706.if ${MK_SOURCELESS_UCODE} != "no"
707_iwifw=		iwifw
708.endif
709_iwn=		iwn
710.if ${MK_SOURCELESS_UCODE} != "no"
711_iwnfw=		iwnfw
712.endif
713_ixgb=		ixgb
714_ixgbe=		ixgbe
715_lindev=	lindev
716_linprocfs=	linprocfs
717_linsysfs=	linsysfs
718_linux=		linux
719_mly=		mly
720.if ${MK_OFED} != "no" || defined(ALL_MODULES)
721_mlx4=		mlx4
722_mlx4ib=	mlx4ib
723_mlxen=		mlxen
724_mthca=		mthca
725.endif
726_ndis=		ndis
727_nfe=		nfe
728_ntb=		ntb
729_nvd=		nvd
730_nvme=		nvme
731_nvram=		nvram
732_nxge=		nxge
733.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
734_opensolaris=	opensolaris
735.endif
736.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
737_padlock=	padlock
738.endif
739_pccard=	pccard
740_qlxge=		qlxge
741_qlxgb=		qlxgb
742_qlxgbe=	qlxgbe
743.if ${MK_OFED} != "no" || defined(ALL_MODULES)
744_rdma=		rdma
745.endif
746_s3=		s3
747_safe=		safe
748_scsi_low=	scsi_low
749_sfxge=		sfxge
750_smbfs=		smbfs
751_sound=		sound
752_speaker=	speaker
753_splash=	splash
754_sppp=		sppp
755_tpm=		tpm
756_twa=		twa
757_vesa=		vesa
758_viawd=		viawd
759_virtio=	virtio
760_vmm=		vmm
761_vxge=  	vxge
762_x86bios=	x86bios
763_wbwd=		wbwd
764_wi=		wi
765_wpi=		wpi
766.if ${MK_SOURCELESS_UCODE} != "no"
767_wpifw=		wpifw
768.endif
769.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
770_zfs=		zfs
771.endif
772.endif
773
774.if ${MACHINE_CPUARCH} == "arm"
775_cfi=		cfi
776_cpsw=		cpsw
777.endif
778
779.if ${MACHINE_CPUARCH} == "ia64"
780_aac=		aac
781_aacraid=	aacraid
782_aic=		aic
783_an=		an
784_arcnet=	arcnet
785_asr=		asr
786_bktr=		bktr
787_cardbus=	cardbus
788_cbb=		cbb
789_ciss=		ciss
790_cm=		cm
791_cmx=		cmx
792_coff=		coff
793_cpufreq=	cpufreq
794_dpt=		dpt
795_em=		em
796_ep=		ep
797_et=		et
798_exca=		exca
799_fe=		fe
800_hptiop=	hptiop
801_ida=		ida
802_igb=		igb
803_iir=		iir
804_ips=		ips
805_mly=		mly
806_pccard=	pccard
807_scsi_low=	scsi_low
808_smbfs=		smbfs
809_sound=		sound
810_splash=	splash
811_sppp=		sppp
812_streams=	streams
813_tpm=		tpm
814_twa=		twa
815_wi=		wi
816_xe=		xe
817.endif
818
819.if ${MACHINE_CPUARCH} == "powerpc"
820_agp=		agp
821_an=		an
822_bm=		bm
823_cardbus=	cardbus
824_cbb=		cbb
825_cfi=		cfi
826_cpufreq=	cpufreq
827.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
828_cyclic=	cyclic
829.endif
830_drm=		drm
831.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
832_dtrace=	dtrace
833.endif
834_exca=		exca
835_nvram=		powermac_nvram
836_pccard=	pccard
837_smbfs=		smbfs
838_sound=		sound
839.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
840_opensolaris=	opensolaris
841.endif
842_wi=		wi
843.endif
844
845.if ${MACHINE_ARCH} == "powerpc64"
846.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
847_zfs=		zfs
848.endif
849.endif
850
851.if ${MACHINE_CPUARCH} == "sparc64"
852_auxio=		auxio
853_em=		em
854_epic=		epic
855_i2c=		i2c
856_igb=		igb
857.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
858_opensolaris=	opensolaris
859.endif
860_smbfs=		smbfs
861_sound=		sound
862.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
863_zfs=		zfs
864.endif
865.endif
866
867.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
868SUBDIR=${MODULES_OVERRIDE}
869.endif
870
871.for reject in ${WITHOUT_MODULES}
872SUBDIR:= ${SUBDIR:N${reject}}
873.endfor
874
875# Calling kldxref(8) for each module is expensive.
876.if !defined(NO_XREF)
877.MAKEFLAGS+=	-DNO_XREF
878afterinstall:
879	@if type kldxref >/dev/null 2>&1; then \
880		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
881		kldxref ${DESTDIR}${KMODDIR}; \
882	fi
883.endif
884
885.include <bsd.subdir.mk>
886