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