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