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