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