xref: /freebsd/sys/modules/Makefile (revision e982e5c5610e41b669d89ce488d65e68f311159d)
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_linuxapi=	linuxapi
506_ndis=		ndis
507.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
508_opensolaris=	opensolaris
509.endif
510_pccard=	pccard
511.if ${MK_OFED} != "no" || defined(ALL_MODULES)
512_rdma=		rdma
513.endif
514_safe=		safe
515_scsi_low=	scsi_low
516_si=		si
517_smbfs=		smbfs
518_sound=		sound
519_speaker=	speaker
520_splash=	splash
521_sppp=		sppp
522_vmware=	vmware
523_vxge=  	vxge
524_wbwd=		wbwd
525_wi=		wi
526_xe=		xe
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_elink=		elink
634_glxiic=	glxiic
635_glxsb=		glxsb
636_ibcs2=		ibcs2
637_ie=		ie
638_mse=		mse
639_ncr=		ncr
640_ncv=		ncv
641_nsp=		nsp
642_pcfclock=	pcfclock
643_pst=		pst
644_sbni=		sbni
645_streams=	streams
646_stg=		stg
647_svr4=		svr4
648_wds=		wds
649.if ${MACHINE} == "i386"
650.if ${MK_EISA} != "no"
651_ahb=		ahb
652.endif
653_bios=		bios
654_cm=		cm
655.if ${MK_SOURCELESS_UCODE} != "no"
656_ctau=		ctau
657.endif
658_dpt=		dpt
659_ex=		ex
660_wl=		wl
661.elif ${MACHINE} == "pc98"
662_canbepm=	canbepm
663_canbus=	canbus
664_ct=		ct
665_pmc=		pmc
666_snc=		snc
667.endif
668.endif
669
670.if ${MACHINE_CPUARCH} == "arm"
671_cfi=		cfi
672_cpsw=		cpsw
673_sound=		sound
674.endif
675
676.if ${MACHINE_CPUARCH} == "powerpc"
677_agp=		agp
678_an=		an
679_bm=		bm
680_cardbus=	cardbus
681_cbb=		cbb
682_cfi=		cfi
683_cpufreq=	cpufreq
684_drm=		drm
685.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
686_dtrace=	dtrace
687.endif
688_exca=		exca
689_nvram=		powermac_nvram
690.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
691_opensolaris=	opensolaris
692.endif
693_pccard=	pccard
694_smbfs=		smbfs
695_sound=		sound
696_wi=		wi
697.endif
698
699.if ${MACHINE_ARCH} == "powerpc64"
700.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
701_zfs=		zfs
702.endif
703.endif
704
705.if ${MACHINE_CPUARCH} == "sparc64"
706_auxio=		auxio
707_em=		em
708_epic=		epic
709_i2c=		i2c
710_igb=		igb
711.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
712_opensolaris=	opensolaris
713.endif
714_smbfs=		smbfs
715_sound=		sound
716.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
717_zfs=		zfs
718.endif
719.endif
720
721.endif
722
723.for reject in ${WITHOUT_MODULES}
724SUBDIR:= ${SUBDIR:N${reject}}
725.endfor
726
727# Calling kldxref(8) for each module is expensive.
728.if !defined(NO_XREF)
729.MAKEFLAGS+=	-DNO_XREF
730afterinstall:
731	@if type kldxref >/dev/null 2>&1; then \
732		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
733		kldxref ${DESTDIR}${KMODDIR}; \
734	fi
735.endif
736
737.include <bsd.subdir.mk>
738