xref: /freebsd/sys/modules/Makefile (revision 603eaf792b659f91d7d1a065d82503966d1386fc)
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_gif} \
149	${_if_gre} \
150	${_if_me} \
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_if_gif=	if_gif
407_if_gre=	if_gre
408.endif
409
410.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
411_if_me=		if_me
412_ipdivert=	ipdivert
413_ipfw=		ipfw
414.endif
415
416.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
417_ipfilter=	ipfilter
418.endif
419
420.if ${MK_NAND} != "no" || defined(ALL_MODULES)
421_nandfs=	nandfs
422_nandsim=	nandsim
423.endif
424
425.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
426_netgraph=	netgraph
427.endif
428
429.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
430	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
431_pf=		pf
432_pflog=		pflog
433.if ${MK_INET_SUPPORT} != "no"
434_pfsync=	pfsync
435.endif
436.endif
437
438.if ${MK_SOURCELESS_UCODE} != "no"
439_bce=		bce
440_cxgbe=		cxgbe
441_fatm=		fatm
442_fxp=		fxp
443_ispfw=		ispfw
444_mwlfw=		mwlfw
445_ralfw=		ralfw
446_sf=		sf
447_sn=		sn
448_ti=		ti
449_txp=		txp
450.endif
451
452
453.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
454	${MACHINE_CPUARCH} != "powerpc"
455_syscons=	syscons
456_vpo=		vpo
457.endif
458
459.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
460# no BUS_SPACE_UNSPECIFIED
461# No barrier instruction support (specific to this driver)
462_sym=		sym
463# intr_disable() is a macro, causes problems
464.if ${MK_SOURCELESS_UCODE} != "no"
465_cxgb=		cxgb
466.endif
467.endif
468
469.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
470_agp=		agp
471_an=		an
472_aout=		aout
473_bktr=		bktr
474_bxe=		bxe
475_cardbus=	cardbus
476_cbb=		cbb
477_cpuctl=	cpuctl
478_cpufreq=	cpufreq
479.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
480_cyclic=	cyclic
481.endif
482_dpms=		dpms
483_drm=		drm
484_drm2=		drm2
485.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
486_dtrace=	dtrace
487.endif
488_ed=		ed
489_em=		em
490_et=		et
491_exca=		exca
492_ext2fs=	ext2fs
493_filemon=	filemon
494_i2c=		i2c
495.if ${MK_OFED} != "no" || defined(ALL_MODULES)
496_ibcore=        ibcore
497.endif
498_if_ndis=	if_ndis
499_igb=		igb
500_io=		io
501.if ${MK_OFED} != "no" || defined(ALL_MODULES)
502_ipoib=         ipoib
503.endif
504_linprocfs=	linprocfs
505_linsysfs=	linsysfs
506_linux=		linux
507_ndis=		ndis
508.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
509_opensolaris=	opensolaris
510.endif
511_pccard=	pccard
512.if ${MK_OFED} != "no" || defined(ALL_MODULES)
513_rdma=		rdma
514.endif
515_safe=		safe
516_scsi_low=	scsi_low
517_si=		si
518_smbfs=		smbfs
519_sound=		sound
520_speaker=	speaker
521_splash=	splash
522_sppp=		sppp
523_vmware=	vmware
524_vxge=  	vxge
525_wbwd=		wbwd
526_wi=		wi
527.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
528_zfs=		zfs
529.endif
530.if ${MACHINE} != "pc98"
531_aac=		aac
532_aacraid=	aacraid
533_acpi=		acpi
534.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
535_aesni=		aesni
536.endif
537_amdsbwd=	amdsbwd
538_amdtemp=	amdtemp
539_arcmsr=	arcmsr
540_asmc=		asmc
541_ciss=		ciss
542_cmx=		cmx
543_coretemp=	coretemp
544.if ${MK_SOURCELESS_HOST} != "no"
545_hpt27xx=	hpt27xx
546.endif
547_hptiop=	hptiop
548.if ${MK_SOURCELESS_HOST} != "no"
549_hptmv=		hptmv
550_hptnr=		hptnr
551_hptrr=		hptrr
552.endif
553_hyperv=	hyperv
554_ichwd=		ichwd
555_ida=		ida
556_iir=		iir
557_ipmi=		ipmi
558_ips=		ips
559_ipw=		ipw
560.if ${MK_SOURCELESS_UCODE} != "no"
561_ipwfw=		ipwfw
562.endif
563_isci=		isci
564_iwi=		iwi
565.if ${MK_SOURCELESS_UCODE} != "no"
566_iwifw=		iwifw
567.endif
568_iwn=		iwn
569.if ${MK_SOURCELESS_UCODE} != "no"
570_iwnfw=		iwnfw
571.endif
572_ixgb=		ixgb
573_ixgbe=		ixgbe
574.if ${MK_OFED} != "no" || defined(ALL_MODULES)
575_mlx4=		mlx4
576_mlx4ib=	mlx4ib
577_mlxen=		mlxen
578.endif
579_mly=		mly
580.if ${MK_OFED} != "no" || defined(ALL_MODULES)
581_mthca=		mthca
582.endif
583_nfe=		nfe
584_nvd=		nvd
585_nvme=		nvme
586_nvram=		nvram
587_nxge=		nxge
588.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
589_padlock=	padlock
590_padlock_rng=	padlock_rng
591_rdrand_rng=	rdrand_rng
592.endif
593_s3=		s3
594_tpm=		tpm
595_twa=		twa
596_vesa=		vesa
597_viawd=		viawd
598_virtio=	virtio
599_wpi=		wpi
600.if ${MK_SOURCELESS_UCODE} != "no"
601_wpifw=		wpifw
602.endif
603_x86bios=	x86bios
604.endif
605.endif
606
607.if ${MACHINE_CPUARCH} == "amd64"
608_ixl=		ixl
609_ixlv=		ixlv
610_ntb=		ntb
611_qlxge=		qlxge
612_qlxgb=		qlxgb
613_qlxgbe=	qlxgbe
614_sfxge=		sfxge
615_vmm=		vmm
616.endif
617
618.if ${MACHINE_CPUARCH} == "i386"
619# XXX some of these can move to the general case when de-i386'ed
620# XXX some of these can move now, but are untested on other architectures.
621_3dfx=		3dfx
622_3dfx_linux=	3dfx_linux
623_aic=		aic
624_apm=		apm
625_arcnet=	arcnet
626.if ${MK_SOURCELESS_UCODE} != "no"
627_ce=		ce
628.endif
629_coff=		coff
630.if ${MK_SOURCELESS_UCODE} != "no"
631_cp=		cp
632.endif
633_cs=		cs
634_elink=		elink
635_ep=		ep
636_fe=		fe
637_glxiic=	glxiic
638_glxsb=		glxsb
639_ibcs2=		ibcs2
640_ie=		ie
641_mse=		mse
642_ncr=		ncr
643_ncv=		ncv
644_nsp=		nsp
645_pcfclock=	pcfclock
646_pst=		pst
647_sbni=		sbni
648_streams=	streams
649_stg=		stg
650_svr4=		svr4
651_wds=		wds
652_xe=		xe
653.if ${MACHINE} == "i386"
654.if ${MK_EISA} != "no"
655_ahb=		ahb
656.endif
657_asr=		asr
658_bios=		bios
659_cm=		cm
660.if ${MK_SOURCELESS_UCODE} != "no"
661_ctau=		ctau
662.endif
663_dpt=		dpt
664_ex=		ex
665_wl=		wl
666.elif ${MACHINE} == "pc98"
667_canbepm=	canbepm
668_canbus=	canbus
669_ct=		ct
670_pmc=		pmc
671_snc=		snc
672.endif
673.endif
674
675.if ${MACHINE_CPUARCH} == "arm"
676_cfi=		cfi
677_cpsw=		cpsw
678_sound=		sound
679.endif
680
681.if ${MACHINE_CPUARCH} == "powerpc"
682_agp=		agp
683_an=		an
684_bm=		bm
685_cardbus=	cardbus
686_cbb=		cbb
687_cfi=		cfi
688_cpufreq=	cpufreq
689.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
690_cyclic=	cyclic
691.endif
692_drm=		drm
693.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
694_dtrace=	dtrace
695.endif
696_exca=		exca
697_nvram=		powermac_nvram
698.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
699_opensolaris=	opensolaris
700.endif
701_pccard=	pccard
702_smbfs=		smbfs
703_sound=		sound
704_wi=		wi
705.endif
706
707.if ${MACHINE_ARCH} == "powerpc64"
708.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
709_zfs=		zfs
710.endif
711.endif
712
713.if ${MACHINE_CPUARCH} == "sparc64"
714_auxio=		auxio
715_em=		em
716_epic=		epic
717_i2c=		i2c
718_igb=		igb
719.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
720_opensolaris=	opensolaris
721.endif
722_smbfs=		smbfs
723_sound=		sound
724.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
725_zfs=		zfs
726.endif
727.endif
728
729.endif
730
731.for reject in ${WITHOUT_MODULES}
732SUBDIR:= ${SUBDIR:N${reject}}
733.endfor
734
735# Calling kldxref(8) for each module is expensive.
736.if !defined(NO_XREF)
737.MAKEFLAGS+=	-DNO_XREF
738afterinstall:
739	@if type kldxref >/dev/null 2>&1; then \
740		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
741		kldxref ${DESTDIR}${KMODDIR}; \
742	fi
743.endif
744
745.include <bsd.subdir.mk>
746