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