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