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