xref: /freebsd/sys/modules/Makefile (revision 061b8865d125bb564cfc807b8348b684d2485ebc)
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	${_tpm} \
318	trm \
319	${_twa} \
320	twe \
321	tws \
322	tx \
323	${_txp} \
324	uart \
325	ubsec \
326	udf \
327	udf_iconv \
328	ufs \
329	unionfs \
330	usb \
331	utopia \
332	${_vesa} \
333	${_virtio} \
334	vge \
335	${_viawd} \
336	vkbd \
337	${_vpo} \
338	vr \
339	vte \
340	vx \
341	${_vxge} \
342	wb \
343	${_wbwd} \
344	${_wi} \
345	wlan \
346	wlan_acl \
347	wlan_amrr \
348	wlan_ccmp \
349	wlan_rssadapt \
350	wlan_tkip \
351	wlan_wep \
352	wlan_xauth \
353	${_wpi} \
354	${_wpifw} \
355	${_x86bios} \
356	${_xe} \
357	xfs \
358	xl \
359	${_zfs} \
360	zlib \
361
362.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
363_filemon=	filemon
364.endif
365
366.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \
367	${MACHINE_CPUARCH} != "mips"
368_syscons=	syscons
369_vpo=		vpo
370.endif
371
372.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
373# no BUS_SPACE_UNSPECIFIED
374# No barrier instruction support (specific to this driver)
375_sym=		sym
376# intr_disable() is a macro, causes problems
377.if ${MK_SOURCELESS_UCODE} != "no"
378_cxgb=		cxgb
379.endif
380.endif
381
382.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
383.if exists(${.CURDIR}/../opencrypto)
384_crypto=	crypto
385_cryptodev=	cryptodev
386.endif
387.if exists(${.CURDIR}/../crypto)
388_random=	random
389.endif
390.endif
391
392.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
393	defined(ALL_MODULES)
394_carp=	carp
395.endif
396
397.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
398_if_gre=	if_gre
399.endif
400
401.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
402_ipfilter=	ipfilter
403.endif
404
405.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
406_ipdivert=	ipdivert
407_ipfw=		ipfw
408.endif
409
410.if ${MK_NAND} != "no" || defined(ALL_MODULES)
411_nandfs=	nandfs
412_nandsim=	nandsim
413.endif
414
415.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
416_netgraph=	netgraph
417.endif
418
419.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
420	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
421_pf=		pf
422_pflog=		pflog
423.if ${MK_INET_SUPPORT} != "no"
424_pfsync=	pfsync
425.endif
426.endif
427
428.if ${MK_SOURCELESS_UCODE} != "no"
429_bce=		bce
430_fatm=		fatm
431_fxp=		fxp
432_ispfw=		ispfw
433_mwlfw=		mwlfw
434_ralfw=		ralfw
435_runfw=		runfw
436_sf=		sf
437_sn=		sn
438_ti=		ti
439_txp=		txp
440.endif
441
442.if ${MACHINE_CPUARCH} == "i386"
443# XXX some of these can move to the general case when de-i386'ed
444# XXX some of these can move now, but are untested on other architectures.
445_3dfx=		3dfx
446_3dfx_linux=	3dfx_linux
447_agp=		agp
448_aic=		aic
449_an=		an
450_aout=		aout
451_apm=		apm
452_arcnet=	arcnet
453_bktr=		bktr
454_bxe=		bxe
455_cardbus=	cardbus
456_cbb=		cbb
457.if ${MK_SOURCELESS_UCODE} != "no"
458_ce=		ce
459.endif
460_coff=		coff
461.if ${MK_SOURCELESS_UCODE} != "no"
462_cp=		cp
463.endif
464_cpuctl=	cpuctl
465_cpufreq=	cpufreq
466_cs=		cs
467.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
468_cyclic=	cyclic
469.endif
470_dpms=		dpms
471_drm=		drm
472_drm2=		drm2
473.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
474_dtrace=	dtrace
475.endif
476_ed=		ed
477_elink=		elink
478_em=		em
479_ep=		ep
480_et=		et
481_exca=		exca
482_ext2fs=	ext2fs
483_fe=		fe
484_glxiic=	glxiic
485_glxsb=		glxsb
486_i2c=		i2c
487_ibcs2=		ibcs2
488_ie=		ie
489_if_ndis=	if_ndis
490_igb=		igb
491_io=		io
492_lindev=	lindev
493_linprocfs=	linprocfs
494_linsysfs=	linsysfs
495_linux=		linux
496_mse=		mse
497.if ${MK_OFED} != "no" || defined(ALL_MODULES)
498_mlx4=		mlx4
499_mlx4ib=	mlx4ib
500_mlxen=		mlxen
501_mthca=		mthca
502.endif
503.if ${MK_NCP} != "no"
504_ncp=		ncp
505.endif
506_ncv=		ncv
507_ndis=		ndis
508_nsp=		nsp
509.if ${MK_NCP} != "no"
510_nwfs=		nwfs
511.endif
512.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
513_opensolaris=	opensolaris
514.endif
515_pccard=	pccard
516_pcfclock=	pcfclock
517_pst=		pst
518_rdma=		rdma
519_safe=		safe
520_sbni=		sbni
521_scsi_low=	scsi_low
522_smbfs=		smbfs
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_acpi=		acpi
540.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
541_aesni=		aesni
542.endif
543_ahb=		ahb
544_amdsbwd=	amdsbwd
545_amdtemp=	amdtemp
546_arcmsr=	arcmsr
547_asmc=		asmc
548_asr=		asr
549_bios=		bios
550_ciss=		ciss
551_cm=		cm
552_cmx=		cmx
553_coretemp=	coretemp
554.if ${MK_SOURCELESS_UCODE} != "no"
555_ctau=		ctau
556.endif
557_dpt=		dpt
558_ex=		ex
559.if ${MK_SOURCELESS_HOST} != "no"
560_hpt27xx=	hpt27xx
561.endif
562_hptiop=	hptiop
563.if ${MK_SOURCELESS_HOST} != "no"
564_hptmv=		hptmv
565_hptrr=		hptrr
566.endif
567_ichwd=		ichwd
568_ida=		ida
569_iir=		iir
570_ipmi=		ipmi
571_ips=		ips
572_ipw=		ipw
573.if ${MK_SOURCELESS_UCODE} != "no"
574_ipwfw=		ipwfw
575.endif
576_isci=		isci
577_iwi=		iwi
578.if ${MK_SOURCELESS_UCODE} != "no"
579_iwifw=		iwifw
580.endif
581_iwn=		iwn
582.if ${MK_SOURCELESS_UCODE} != "no"
583_iwnfw=		iwnfw
584.endif
585_ixgb=		ixgb
586_ixgbe=		ixgbe
587_mly=		mly
588_nfe=		nfe
589.if ${MK_SOURCELESS_HOST} != "no"
590_nve=		nve
591.endif
592_nvram=		nvram
593_nxge=		nxge
594_tpm=		tpm
595_viawd=		viawd
596_wpi=		wpi
597.if ${MK_SOURCELESS_UCODE} != "no"
598_wpifw=		wpifw
599.endif
600.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
601_padlock=	padlock
602.endif
603_s3=		s3
604_twa=		twa
605_vesa=		vesa
606_virtio=	virtio
607_x86bios=	x86bios
608.elif ${MACHINE} == "pc98"
609_canbepm=	canbepm
610_canbus=	canbus
611_pmc=		pmc
612_snc=		snc
613.endif
614.endif
615
616.if ${MACHINE_CPUARCH} == "amd64"
617_aac=		aac
618_aout=		aout
619_acpi=		acpi
620.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
621_aesni=		aesni
622.endif
623_agp=		agp
624_an=		an
625_amdsbwd=	amdsbwd
626_amdtemp=	amdtemp
627_arcmsr=	arcmsr
628_asmc=		asmc
629_bktr=		bktr
630_bxe=		bxe
631_cardbus=	cardbus
632_cbb=		cbb
633_cmx=		cmx
634_ciss=		ciss
635_coretemp=	coretemp
636_cpuctl=	cpuctl
637_cpufreq=	cpufreq
638.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
639_cyclic=	cyclic
640.endif
641_dpms=		dpms
642_drm=		drm
643_drm2=		drm2
644.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
645_dtrace=	dtrace
646.endif
647_ed=		ed
648_et=		et
649_em=		em
650_exca=		exca
651_ext2fs=	ext2fs
652.if ${MK_SOURCELESS_HOST} != "no"
653_hpt27xx=	hpt27xx
654.endif
655_hptiop=	hptiop
656.if ${MK_SOURCELESS_HOST} != "no"
657_hptmv=		hptmv
658_hptrr=		hptrr
659.endif
660_i2c=		i2c
661_ichwd=		ichwd
662_ida=		ida
663_if_ndis=	if_ndis
664_igb=		igb
665_iir=		iir
666_io=		io
667_ipmi=		ipmi
668_ips=		ips
669_ipw=		ipw
670.if ${MK_SOURCELESS_UCODE} != "no"
671_ipwfw=		ipwfw
672.endif
673_isci=		isci
674_iwi=		iwi
675.if ${MK_SOURCELESS_UCODE} != "no"
676_iwifw=		iwifw
677.endif
678_iwn=		iwn
679.if ${MK_SOURCELESS_UCODE} != "no"
680_iwnfw=		iwnfw
681.endif
682_ixgb=		ixgb
683_ixgbe=		ixgbe
684_lindev=	lindev
685_linprocfs=	linprocfs
686_linsysfs=	linsysfs
687_linux=		linux
688_mly=		mly
689.if ${MK_OFED} != "no" || defined(ALL_MODULES)
690_mlx4=		mlx4
691_mlx4ib=	mlx4ib
692_mlxen=		mlxen
693_mthca=		mthca
694.endif
695_ndis=		ndis
696_nfe=		nfe
697.if ${MK_SOURCELESS_HOST} != "no"
698_nve=		nve
699.endif
700_nvram=		nvram
701_nxge=		nxge
702.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
703_opensolaris=	opensolaris
704.endif
705.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
706_padlock=	padlock
707.endif
708_pccard=	pccard
709_qlxgb=		qlxgb
710_rdma=		rdma
711_s3=		s3
712_safe=		safe
713_scsi_low=	scsi_low
714_sfxge=		sfxge
715_smbfs=		smbfs
716_sound=		sound
717_speaker=	speaker
718_splash=	splash
719_sppp=		sppp
720_tpm=		tpm
721_twa=		twa
722_vesa=		vesa
723_viawd=		viawd
724_virtio=	virtio
725_vxge=  	vxge
726_x86bios=	x86bios
727_wbwd=		wbwd
728_wi=		wi
729_wpi=		wpi
730.if ${MK_SOURCELESS_UCODE} != "no"
731_wpifw=		wpifw
732.endif
733.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
734_zfs=		zfs
735.endif
736.endif
737
738.if ${MACHINE_CPUARCH} == "arm"
739_cfi=		cfi
740.endif
741
742.if ${MACHINE_CPUARCH} == "ia64"
743_aac=		aac
744_aic=		aic
745_an=		an
746_arcnet=	arcnet
747_asr=		asr
748_bktr=		bktr
749_cardbus=	cardbus
750_cbb=		cbb
751_ciss=		ciss
752_cm=		cm
753_cmx=		cmx
754_coff=		coff
755_cpufreq=	cpufreq
756_dpt=		dpt
757_em=		em
758_ep=		ep
759_et=		et
760_exca=		exca
761_fe=		fe
762_hptiop=	hptiop
763_ida=		ida
764_igb=		igb
765_iir=		iir
766_ips=		ips
767_mly=		mly
768_pccard=	pccard
769_scsi_low=	scsi_low
770_smbfs=		smbfs
771_sound=		sound
772_splash=	splash
773_sppp=		sppp
774_streams=	streams
775_tpm=		tpm
776_twa=		twa
777_wi=		wi
778_xe=		xe
779.endif
780
781.if ${MACHINE_CPUARCH} == "powerpc"
782_agp=		agp
783_an=		an
784_bm=		bm
785_cardbus=	cardbus
786_cbb=		cbb
787_cfi=		cfi
788_cpufreq=	cpufreq
789_exca=		exca
790_nvram=		powermac_nvram
791_pccard=	pccard
792_smbfs=		smbfs
793_sound=		sound
794.endif
795
796.if ${MACHINE_ARCH} == "powerpc64"
797.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
798_opensolaris=	opensolaris
799.endif
800.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
801_zfs=		zfs
802.endif
803.endif
804
805.if ${MACHINE_CPUARCH} == "sparc64"
806_auxio=		auxio
807_em=		em
808_epic=		epic
809_i2c=		i2c
810_igb=		igb
811.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
812_opensolaris=	opensolaris
813.endif
814_smbfs=		smbfs
815_sound=		sound
816.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
817_zfs=		zfs
818.endif
819.endif
820
821.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
822SUBDIR=${MODULES_OVERRIDE}
823.endif
824
825.for reject in ${WITHOUT_MODULES}
826SUBDIR:= ${SUBDIR:N${reject}}
827.endfor
828
829# Calling kldxref(8) for each module is expensive.
830.if !defined(NO_XREF)
831.MAKEFLAGS+=	-DNO_XREF
832afterinstall:
833	@if type kldxref >/dev/null 2>&1; then \
834		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
835		kldxref ${DESTDIR}${KMODDIR}; \
836	fi
837.endif
838
839.include <bsd.subdir.mk>
840