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