xref: /freebsd/sys/modules/Makefile (revision c6ec7d31830ab1c80edae95ad5e4b9dba10c47ac)
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	${_coff} \
71	${_coretemp} \
72	${_cp} \
73	${_cpsw} \
74	${_cpuctl} \
75	${_cpufreq} \
76	${_crypto} \
77	${_cryptodev} \
78	${_cs} \
79	${_ct} \
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	fuse \
113	${_fxp} \
114	gem \
115	geom \
116	${_glxiic} \
117	${_glxsb} \
118	hatm \
119	hifn \
120	hme \
121	${_hpt27xx} \
122	${_hptiop} \
123	${_hptmv} \
124	${_hptrr} \
125	hwpmc \
126	${_i2c} \
127	${_ibcs2} \
128	${_ichwd} \
129	${_ida} \
130	${_ie} \
131	if_bridge \
132	if_disc \
133	if_edsc \
134	if_ef \
135	if_epair \
136	if_faith \
137	if_gif \
138	${_if_gre} \
139	if_lagg \
140	${_if_ndis} \
141	if_stf \
142	if_tap \
143	if_tun \
144	if_vlan \
145	${_igb} \
146	${_iir} \
147	${_io} \
148	${_ipdivert} \
149	${_ipfilter} \
150	${_ipfw} \
151	ipfw_nat \
152	${_ipmi} \
153	ip6_mroute_mod \
154	ip_mroute_mod \
155	${_ips} \
156	${_ipw} \
157	${_ipwfw} \
158	${_isci} \
159	iscsi \
160	isp \
161	${_ispfw} \
162	${_iwi} \
163	${_iwifw} \
164	${_iwn} \
165	${_iwnfw} \
166	${_ixgb} \
167	${_ixgbe} \
168	jme \
169	joy \
170	kbdmux \
171	kgssapi \
172	kgssapi_krb5 \
173	khelp \
174	krpc \
175	ksyms \
176	le \
177	lge \
178	libalias \
179	libiconv \
180	libmbpool \
181	libmchain \
182	${_lindev} \
183	${_linprocfs} \
184	${_linsysfs} \
185	${_linux} \
186	lmc \
187	lpt \
188	mac_biba \
189	mac_bsdextended \
190	mac_ifoff \
191	mac_lomac \
192	mac_mls \
193	mac_none \
194	mac_partition \
195	mac_portacl \
196	mac_seeotheruids \
197	mac_stub \
198	mac_test \
199	malo \
200	mcd \
201	md \
202	mem \
203	mfi \
204	mii \
205	mlx \
206	${_mlx4} \
207	${_mlx4ib} \
208	${_mlxen} \
209	${_mly} \
210	mmc \
211	mmcsd \
212	mps \
213	mpt \
214	mqueue \
215	msdosfs \
216	msdosfs_iconv \
217	${_mse} \
218	msk \
219	${_mthca} \
220	mvs \
221	mwl \
222	${_mwlfw} \
223	mxge \
224	my \
225	${_nandfs} \
226	${_nandsim} \
227	${_ncp} \
228	${_ncv} \
229	${_ndis} \
230	${_netgraph} \
231	${_nfe} \
232	nfs_common \
233	nfscl \
234	nfsclient \
235	nfscommon \
236	nfsd \
237	nfslock \
238	nfslockd \
239	nfsserver \
240	nfssvc \
241	nge \
242	nmdm \
243	${_nsp} \
244	nullfs \
245	${_nvd} \
246	${_nve} \
247	${_nvme} \
248	${_nvram} \
249	${_nxge} \
250	${_opensolaris} \
251	oce \
252	${_padlock} \
253	patm \
254	${_pccard} \
255	${_pcfclock} \
256	pcn \
257	${_pf} \
258	${_pflog} \
259	${_pfsync} \
260	plip \
261	${_pmc} \
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	sdhci_pci \
289	sem \
290	send \
291	${_sf} \
292	${_sfxge} \
293	sge \
294	siba_bwn \
295	siftr \
296	siis \
297	sis \
298	sk \
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	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_toecore=	toecore
396.endif
397
398.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
399_if_gre=	if_gre
400.endif
401
402.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
403_ipfilter=	ipfilter
404.endif
405
406.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
407_ipdivert=	ipdivert
408_ipfw=		ipfw
409.endif
410
411.if ${MK_NAND} != "no" || defined(ALL_MODULES)
412_nandfs=	nandfs
413_nandsim=	nandsim
414.endif
415
416.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
417_netgraph=	netgraph
418.endif
419
420.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
421	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
422_pf=		pf
423_pflog=		pflog
424.if ${MK_INET_SUPPORT} != "no"
425_pfsync=	pfsync
426.endif
427.endif
428
429.if ${MK_SOURCELESS_UCODE} != "no"
430_bce=		bce
431_fatm=		fatm
432_fxp=		fxp
433_ispfw=		ispfw
434_mwlfw=		mwlfw
435_ralfw=		ralfw
436_runfw=		runfw
437_sf=		sf
438_sn=		sn
439_ti=		ti
440_txp=		txp
441.endif
442
443.if ${MACHINE_CPUARCH} == "i386"
444# XXX some of these can move to the general case when de-i386'ed
445# XXX some of these can move now, but are untested on other architectures.
446_3dfx=		3dfx
447_3dfx_linux=	3dfx_linux
448_agp=		agp
449_aic=		aic
450_an=		an
451_aout=		aout
452_apm=		apm
453_arcnet=	arcnet
454_bktr=		bktr
455_bxe=		bxe
456_cardbus=	cardbus
457_cbb=		cbb
458.if ${MK_SOURCELESS_UCODE} != "no"
459_ce=		ce
460.endif
461_coff=		coff
462.if ${MK_SOURCELESS_UCODE} != "no"
463_cp=		cp
464.endif
465_cpuctl=	cpuctl
466_cpufreq=	cpufreq
467_cs=		cs
468.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
469_cyclic=	cyclic
470.endif
471_dpms=		dpms
472_drm=		drm
473_drm2=		drm2
474.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
475_dtrace=	dtrace
476.endif
477_ed=		ed
478_elink=		elink
479_em=		em
480_ep=		ep
481_et=		et
482_exca=		exca
483_ext2fs=	ext2fs
484_fe=		fe
485_glxiic=	glxiic
486_glxsb=		glxsb
487_i2c=		i2c
488_ibcs2=		ibcs2
489_ie=		ie
490_if_ndis=	if_ndis
491_igb=		igb
492_io=		io
493_lindev=	lindev
494_linprocfs=	linprocfs
495_linsysfs=	linsysfs
496_linux=		linux
497_mse=		mse
498.if ${MK_OFED} != "no" || defined(ALL_MODULES)
499_mlx4=		mlx4
500_mlx4ib=	mlx4ib
501_mlxen=		mlxen
502_mthca=		mthca
503.endif
504_ncv=		ncv
505_ndis=		ndis
506_nsp=		nsp
507.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
508_opensolaris=	opensolaris
509.endif
510_pccard=	pccard
511_pcfclock=	pcfclock
512_pst=		pst
513_rdma=		rdma
514_safe=		safe
515_sbni=		sbni
516_scsi_low=	scsi_low
517_sound=		sound
518_speaker=	speaker
519_splash=	splash
520_sppp=		sppp
521_stg=		stg
522_streams=	streams
523_svr4=		svr4
524_vxge=  	vxge
525_wbwd=		wbwd
526_wi=		wi
527_xe=		xe
528.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
529_zfs=		zfs
530.endif
531.if ${MACHINE} == "i386"
532_aac=		aac
533_acpi=		acpi
534.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
535_aesni=		aesni
536.endif
537_ahb=		ahb
538_amdsbwd=	amdsbwd
539_amdtemp=	amdtemp
540_arcmsr=	arcmsr
541_asmc=		asmc
542_asr=		asr
543_bios=		bios
544_ciss=		ciss
545_cm=		cm
546_cmx=		cmx
547_coretemp=	coretemp
548.if ${MK_SOURCELESS_UCODE} != "no"
549_ctau=		ctau
550.endif
551_dpt=		dpt
552_ex=		ex
553.if ${MK_SOURCELESS_HOST} != "no"
554_hpt27xx=	hpt27xx
555.endif
556_hptiop=	hptiop
557.if ${MK_SOURCELESS_HOST} != "no"
558_hptmv=		hptmv
559_hptrr=		hptrr
560.endif
561_ichwd=		ichwd
562_ida=		ida
563_iir=		iir
564_ipmi=		ipmi
565_ips=		ips
566_ipw=		ipw
567.if ${MK_SOURCELESS_UCODE} != "no"
568_ipwfw=		ipwfw
569.endif
570_isci=		isci
571_iwi=		iwi
572.if ${MK_SOURCELESS_UCODE} != "no"
573_iwifw=		iwifw
574.endif
575_iwn=		iwn
576.if ${MK_SOURCELESS_UCODE} != "no"
577_iwnfw=		iwnfw
578.endif
579_ixgb=		ixgb
580_ixgbe=		ixgbe
581_mly=		mly
582_nfe=		nfe
583_nvd=		nvd
584.if ${MK_SOURCELESS_HOST} != "no"
585_nve=		nve
586.endif
587_nvme=		nvme
588_nvram=		nvram
589_nxge=		nxge
590_tpm=		tpm
591_viawd=		viawd
592_wpi=		wpi
593.if ${MK_SOURCELESS_UCODE} != "no"
594_wpifw=		wpifw
595.endif
596.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
597_padlock=	padlock
598.endif
599_s3=		s3
600_twa=		twa
601_vesa=		vesa
602_virtio=	virtio
603_x86bios=	x86bios
604.elif ${MACHINE} == "pc98"
605_canbepm=	canbepm
606_canbus=	canbus
607_ct=		ct
608_pmc=		pmc
609_snc=		snc
610.endif
611.endif
612
613.if ${MACHINE_CPUARCH} == "amd64"
614_aac=		aac
615_aout=		aout
616_acpi=		acpi
617.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
618_aesni=		aesni
619.endif
620_agp=		agp
621_an=		an
622_amdsbwd=	amdsbwd
623_amdtemp=	amdtemp
624_arcmsr=	arcmsr
625_asmc=		asmc
626_bktr=		bktr
627_bxe=		bxe
628_cardbus=	cardbus
629_cbb=		cbb
630_cmx=		cmx
631_ciss=		ciss
632_coretemp=	coretemp
633_cpuctl=	cpuctl
634_cpufreq=	cpufreq
635.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
636_cyclic=	cyclic
637.endif
638_dpms=		dpms
639_drm=		drm
640_drm2=		drm2
641.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
642_dtrace=	dtrace
643.endif
644_ed=		ed
645_et=		et
646_em=		em
647_exca=		exca
648_ext2fs=	ext2fs
649.if ${MK_SOURCELESS_HOST} != "no"
650_hpt27xx=	hpt27xx
651.endif
652_hptiop=	hptiop
653.if ${MK_SOURCELESS_HOST} != "no"
654_hptmv=		hptmv
655_hptrr=		hptrr
656.endif
657_i2c=		i2c
658_ichwd=		ichwd
659_ida=		ida
660_if_ndis=	if_ndis
661_igb=		igb
662_iir=		iir
663_io=		io
664_ipmi=		ipmi
665_ips=		ips
666_ipw=		ipw
667.if ${MK_SOURCELESS_UCODE} != "no"
668_ipwfw=		ipwfw
669.endif
670_isci=		isci
671_iwi=		iwi
672.if ${MK_SOURCELESS_UCODE} != "no"
673_iwifw=		iwifw
674.endif
675_iwn=		iwn
676.if ${MK_SOURCELESS_UCODE} != "no"
677_iwnfw=		iwnfw
678.endif
679_ixgb=		ixgb
680_ixgbe=		ixgbe
681_lindev=	lindev
682_linprocfs=	linprocfs
683_linsysfs=	linsysfs
684_linux=		linux
685_mly=		mly
686.if ${MK_OFED} != "no" || defined(ALL_MODULES)
687_mlx4=		mlx4
688_mlx4ib=	mlx4ib
689_mlxen=		mlxen
690_mthca=		mthca
691.endif
692_ndis=		ndis
693_nfe=		nfe
694_nvd=		nvd
695.if ${MK_SOURCELESS_HOST} != "no"
696_nve=		nve
697.endif
698_nvme=		nvme
699_nvram=		nvram
700_nxge=		nxge
701.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
702_opensolaris=	opensolaris
703.endif
704.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
705_padlock=	padlock
706.endif
707_pccard=	pccard
708_qlxgb=		qlxgb
709_rdma=		rdma
710_s3=		s3
711_safe=		safe
712_scsi_low=	scsi_low
713_sfxge=		sfxge
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_cpsw=		cpsw
739.endif
740
741.if ${MACHINE_CPUARCH} == "ia64"
742_aac=		aac
743_aic=		aic
744_an=		an
745_arcnet=	arcnet
746_asr=		asr
747_bktr=		bktr
748_cardbus=	cardbus
749_cbb=		cbb
750_ciss=		ciss
751_cm=		cm
752_cmx=		cmx
753_coff=		coff
754_cpufreq=	cpufreq
755_dpt=		dpt
756_em=		em
757_ep=		ep
758_et=		et
759_exca=		exca
760_fe=		fe
761_hptiop=	hptiop
762_ida=		ida
763_igb=		igb
764_iir=		iir
765_ips=		ips
766_mly=		mly
767_pccard=	pccard
768_scsi_low=	scsi_low
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_drm=		drm
788_exca=		exca
789_nvram=		powermac_nvram
790_pccard=	pccard
791_sound=		sound
792_cyclic=	cyclic
793_dtrace=	dtrace
794_opensolaris=	opensolaris
795.endif
796
797.if ${MACHINE_ARCH} == "powerpc64"
798.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
799_cyclic=	cyclic
800_dtrace=	dtrace
801_opensolaris=	opensolaris
802.endif
803.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
804_zfs=		zfs
805.endif
806.endif
807
808.if ${MACHINE_CPUARCH} == "sparc64"
809_auxio=		auxio
810_em=		em
811_epic=		epic
812_i2c=		i2c
813_igb=		igb
814.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
815_opensolaris=	opensolaris
816.endif
817_sound=		sound
818.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
819_zfs=		zfs
820.endif
821.endif
822
823.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
824SUBDIR=${MODULES_OVERRIDE}
825.endif
826
827.for reject in ${WITHOUT_MODULES}
828SUBDIR:= ${SUBDIR:N${reject}}
829.endfor
830
831# Calling kldxref(8) for each module is expensive.
832.if !defined(NO_XREF)
833.MAKEFLAGS+=	-DNO_XREF
834afterinstall:
835	@if type kldxref >/dev/null 2>&1; then \
836		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
837		kldxref ${DESTDIR}${KMODDIR}; \
838	fi
839.endif
840
841.include <bsd.subdir.mk>
842