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