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