Makefile revision 270892
1# $FreeBSD: stable/10/sys/modules/Makefile 270892 2014-08-31 21:18:23Z trasz $
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	${_cyclic} \
89	dc \
90	dcons \
91	dcons_crom \
92	de \
93	${_dpms} \
94	${_dpt} \
95	${_drm} \
96	${_drm2} \
97	${_dtrace} \
98	dummynet \
99	${_ed} \
100	${_elink} \
101	${_em} \
102	en \
103	${_ep} \
104	${_epic} \
105	esp \
106	${_et} \
107	${_ex} \
108	${_exca} \
109	${_ext2fs} \
110	${_fatm} \
111	fdc \
112	fdescfs \
113	${_fe} \
114	${_filemon} \
115	firewire \
116	firmware \
117	fuse \
118	${_fxp} \
119	gem \
120	geom \
121	${_glxiic} \
122	${_glxsb} \
123	hatm \
124	hifn \
125	hme \
126	${_hpt27xx} \
127	${_hptiop} \
128	${_hptmv} \
129	${_hptnr} \
130	${_hptrr} \
131	hwpmc \
132	${_hyperv} \
133	${_i2c} \
134        ${_ibcore} \
135	${_ibcs2} \
136	${_ichwd} \
137	${_ida} \
138	${_ie} \
139	if_bridge \
140	if_disc \
141	if_edsc \
142	if_ef \
143	if_epair \
144	if_faith \
145	if_gif \
146	${_if_gre} \
147	if_lagg \
148	${_if_ndis} \
149	if_stf \
150	if_tap \
151	if_tun \
152	if_vlan \
153	${_igb} \
154	${_iir} \
155	${_imgact_binmisc} \
156	${_io} \
157        ${_ipoib} \
158	${_ipdivert} \
159	${_ipfilter} \
160	${_ipfw} \
161	ipfw_nat \
162	${_ipmi} \
163	ip6_mroute_mod \
164	ip_mroute_mod \
165	${_ips} \
166	${_ipw} \
167	${_ipwfw} \
168	${_isci} \
169	iscsi \
170	iscsi_initiator \
171	isp \
172	${_ispfw} \
173	${_iwi} \
174	${_iwifw} \
175	${_iwn} \
176	${_iwnfw} \
177	${_ixgb} \
178	${_ixgbe} \
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_CRYPT} != "no" || defined(ALL_MODULES)
408.if exists(${.CURDIR}/../opencrypto)
409_crypto=	crypto
410_cryptodev=	cryptodev
411.endif
412.if exists(${.CURDIR}/../crypto)
413_random=	random
414.endif
415.endif
416
417.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
418	defined(ALL_MODULES)
419_carp=	carp
420_toecore=	toecore
421.endif
422
423.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
424_if_gre=	if_gre
425.endif
426
427.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
428_ipfilter=	ipfilter
429.endif
430
431.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
432_ipdivert=	ipdivert
433_ipfw=		ipfw
434.endif
435
436.if ${MK_NAND} != "no" || defined(ALL_MODULES)
437_nandfs=	nandfs
438_nandsim=	nandsim
439.endif
440
441.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
442_netgraph=	netgraph
443.endif
444
445.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
446	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
447_pf=		pf
448_pflog=		pflog
449.if ${MK_INET_SUPPORT} != "no"
450_pfsync=	pfsync
451.endif
452.endif
453
454.if ${MK_SOURCELESS_UCODE} != "no"
455_bce=		bce
456_fatm=		fatm
457_fxp=		fxp
458_ispfw=		ispfw
459_mwlfw=		mwlfw
460_ralfw=		ralfw
461_sf=		sf
462_sn=		sn
463_ti=		ti
464_txp=		txp
465.endif
466
467.if ${MACHINE_CPUARCH} == "i386"
468# XXX some of these can move to the general case when de-i386'ed
469# XXX some of these can move now, but are untested on other architectures.
470_3dfx=		3dfx
471_3dfx_linux=	3dfx_linux
472_agp=		agp
473_aic=		aic
474_an=		an
475_aout=		aout
476_apm=		apm
477_arcnet=	arcnet
478_bktr=		bktr
479_bxe=		bxe
480_cardbus=	cardbus
481_cbb=		cbb
482.if ${MK_SOURCELESS_UCODE} != "no"
483_ce=		ce
484.endif
485_coff=		coff
486.if ${MK_SOURCELESS_UCODE} != "no"
487_cp=		cp
488.endif
489_cpuctl=	cpuctl
490_cpufreq=	cpufreq
491_cs=		cs
492.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
493_cyclic=	cyclic
494.endif
495_dpms=		dpms
496_drm=		drm
497_drm2=		drm2
498.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
499_dtrace=	dtrace
500.endif
501_ed=		ed
502_elink=		elink
503_em=		em
504_ep=		ep
505_et=		et
506_exca=		exca
507_ext2fs=	ext2fs
508_fe=		fe
509_glxiic=	glxiic
510_glxsb=		glxsb
511_i2c=		i2c
512.if ${MK_OFED} != "no" || defined(ALL_MODULES)
513_ibcore=        ibcore
514.endif
515_ibcs2=		ibcs2
516_ie=		ie
517_if_ndis=	if_ndis
518_igb=		igb
519_io=		io
520.if ${MK_OFED} != "no" || defined(ALL_MODULES)
521_ipoib=         ipoib
522.endif
523_lindev=	lindev
524_linprocfs=	linprocfs
525_linsysfs=	linsysfs
526_linux=		linux
527_mse=		mse
528.if ${MK_OFED} != "no" || defined(ALL_MODULES)
529_mlx4=		mlx4
530_mlx4ib=	mlx4ib
531_mlxen=		mlxen
532_mthca=		mthca
533.endif
534_ncv=		ncv
535_ndis=		ndis
536_nsp=		nsp
537.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
538_opensolaris=	opensolaris
539.endif
540_pccard=	pccard
541_pcfclock=	pcfclock
542_pst=		pst
543_rdma=		rdma
544_safe=		safe
545_sbni=		sbni
546_scsi_low=	scsi_low
547_smbfs=		smbfs
548_sound=		sound
549_speaker=	speaker
550_splash=	splash
551_sppp=		sppp
552_stg=		stg
553_streams=	streams
554_svr4=		svr4
555_vxge=  	vxge
556_wbwd=		wbwd
557_wi=		wi
558_xe=		xe
559.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
560_zfs=		zfs
561.endif
562.if ${MACHINE} == "i386"
563_aac=		aac
564_aacraid=	aacraid
565_acpi=		acpi
566.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
567_aesni=		aesni
568.endif
569_ahb=		ahb
570_amdsbwd=	amdsbwd
571_amdtemp=	amdtemp
572_arcmsr=	arcmsr
573_asmc=		asmc
574_asr=		asr
575_bios=		bios
576_ciss=		ciss
577_cm=		cm
578_cmx=		cmx
579_coretemp=	coretemp
580.if ${MK_SOURCELESS_UCODE} != "no"
581_ctau=		ctau
582.endif
583_dpt=		dpt
584_ex=		ex
585.if ${MK_SOURCELESS_HOST} != "no"
586_hpt27xx=	hpt27xx
587.endif
588_hptiop=	hptiop
589.if ${MK_SOURCELESS_HOST} != "no"
590_hptmv=		hptmv
591_hptnr=		hptnr
592_hptrr=		hptrr
593.endif
594_hyperv=	hyperv
595_ichwd=		ichwd
596_ida=		ida
597_iir=		iir
598_ipmi=		ipmi
599_ips=		ips
600_ipw=		ipw
601.if ${MK_SOURCELESS_UCODE} != "no"
602_ipwfw=		ipwfw
603.endif
604_isci=		isci
605_iwi=		iwi
606.if ${MK_SOURCELESS_UCODE} != "no"
607_iwifw=		iwifw
608.endif
609_iwn=		iwn
610.if ${MK_SOURCELESS_UCODE} != "no"
611_iwnfw=		iwnfw
612.endif
613_ixgb=		ixgb
614_ixgbe=		ixgbe
615_mly=		mly
616_nfe=		nfe
617_nvd=		nvd
618.if ${MK_SOURCELESS_HOST} != "no"
619_nve=		nve
620.endif
621_nvme=		nvme
622_nvram=		nvram
623_nxge=		nxge
624_tpm=		tpm
625_viawd=		viawd
626_wpi=		wpi
627.if ${MK_SOURCELESS_UCODE} != "no"
628_wpifw=		wpifw
629.endif
630.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
631_padlock=	padlock
632.endif
633_s3=		s3
634_twa=		twa
635_vesa=		vesa
636_virtio=	virtio
637_x86bios=	x86bios
638.elif ${MACHINE} == "pc98"
639_canbepm=	canbepm
640_canbus=	canbus
641_ct=		ct
642_pmc=		pmc
643_snc=		snc
644.endif
645.endif
646
647.if ${MACHINE_CPUARCH} == "amd64"
648_aac=		aac
649_aacraid=	aacraid
650_aout=		aout
651_acpi=		acpi
652.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
653_aesni=		aesni
654.endif
655_agp=		agp
656_an=		an
657_amdsbwd=	amdsbwd
658_amdtemp=	amdtemp
659_arcmsr=	arcmsr
660_asmc=		asmc
661_bktr=		bktr
662_bxe=		bxe
663_cardbus=	cardbus
664_cbb=		cbb
665_cmx=		cmx
666_ciss=		ciss
667_coretemp=	coretemp
668_cpuctl=	cpuctl
669_cpufreq=	cpufreq
670.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
671_cyclic=	cyclic
672.endif
673_dpms=		dpms
674_drm=		drm
675_drm2=		drm2
676.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
677_dtrace=	dtrace
678.endif
679_ed=		ed
680_et=		et
681_em=		em
682_exca=		exca
683_ext2fs=	ext2fs
684.if ${MK_SOURCELESS_HOST} != "no"
685_hpt27xx=	hpt27xx
686.endif
687_hptiop=	hptiop
688.if ${MK_SOURCELESS_HOST} != "no"
689_hptmv=		hptmv
690_hptnr=		hptnr
691_hptrr=		hptrr
692.endif
693_hyperv=	hyperv
694_i2c=		i2c
695.if ${MK_OFED} != "no" || defined(ALL_MODULES)
696_ibcore=        ibcore
697.endif
698_ichwd=		ichwd
699_ida=		ida
700_if_ndis=	if_ndis
701_igb=		igb
702_iir=		iir
703_io=		io
704_ipmi=		ipmi
705.if ${MK_OFED} != "no" || defined(ALL_MODULES)
706_ipoib=         ipoib
707.endif
708_ips=		ips
709_ipw=		ipw
710.if ${MK_SOURCELESS_UCODE} != "no"
711_ipwfw=		ipwfw
712.endif
713_isci=		isci
714_iwi=		iwi
715.if ${MK_SOURCELESS_UCODE} != "no"
716_iwifw=		iwifw
717.endif
718_iwn=		iwn
719.if ${MK_SOURCELESS_UCODE} != "no"
720_iwnfw=		iwnfw
721.endif
722_ixgb=		ixgb
723_ixgbe=		ixgbe
724_lindev=	lindev
725_linprocfs=	linprocfs
726_linsysfs=	linsysfs
727_linux=		linux
728_mly=		mly
729.if ${MK_OFED} != "no" || defined(ALL_MODULES)
730_mlx4=		mlx4
731_mlx4ib=	mlx4ib
732_mlxen=		mlxen
733_mthca=		mthca
734.endif
735_ndis=		ndis
736_nfe=		nfe
737_ntb=		ntb
738_nvd=		nvd
739.if ${MK_SOURCELESS_HOST} != "no"
740_nve=		nve
741.endif
742_nvme=		nvme
743_nvram=		nvram
744_nxge=		nxge
745.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
746_opensolaris=	opensolaris
747.endif
748.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
749_padlock=	padlock
750.endif
751_pccard=	pccard
752_qlxge=		qlxge
753_qlxgb=		qlxgb
754_qlxgbe=	qlxgbe
755_rdma=		rdma
756_s3=		s3
757_safe=		safe
758_scsi_low=	scsi_low
759_sfxge=		sfxge
760_smbfs=		smbfs
761_sound=		sound
762_speaker=	speaker
763_splash=	splash
764_sppp=		sppp
765_tpm=		tpm
766_twa=		twa
767_vesa=		vesa
768_viawd=		viawd
769_virtio=	virtio
770_vmm=		vmm
771_vxge=  	vxge
772_x86bios=	x86bios
773_wbwd=		wbwd
774_wi=		wi
775_wpi=		wpi
776.if ${MK_SOURCELESS_UCODE} != "no"
777_wpifw=		wpifw
778.endif
779.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
780_zfs=		zfs
781.endif
782.endif
783
784.if ${MACHINE_CPUARCH} == "arm"
785_cfi=		cfi
786_cpsw=		cpsw
787.endif
788
789.if ${MACHINE_CPUARCH} == "ia64"
790_aac=		aac
791_aacraid=	aacraid
792_aic=		aic
793_an=		an
794_arcnet=	arcnet
795_asr=		asr
796_bktr=		bktr
797_cardbus=	cardbus
798_cbb=		cbb
799_ciss=		ciss
800_cm=		cm
801_cmx=		cmx
802_coff=		coff
803_cpufreq=	cpufreq
804_dpt=		dpt
805_em=		em
806_ep=		ep
807_et=		et
808_exca=		exca
809_fe=		fe
810_hptiop=	hptiop
811_ida=		ida
812_igb=		igb
813_iir=		iir
814_ips=		ips
815_mly=		mly
816_pccard=	pccard
817_scsi_low=	scsi_low
818_smbfs=		smbfs
819_sound=		sound
820_splash=	splash
821_sppp=		sppp
822_streams=	streams
823_tpm=		tpm
824_twa=		twa
825_wi=		wi
826_xe=		xe
827.endif
828
829.if ${MACHINE_CPUARCH} == "powerpc"
830_agp=		agp
831_an=		an
832_bm=		bm
833_cardbus=	cardbus
834_cbb=		cbb
835_cfi=		cfi
836_cpufreq=	cpufreq
837.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
838_cyclic=	cyclic
839.endif
840_drm=		drm
841.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
842_dtrace=	dtrace
843.endif
844_exca=		exca
845_nvram=		powermac_nvram
846_pccard=	pccard
847_smbfs=		smbfs
848_sound=		sound
849.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
850_opensolaris=	opensolaris
851.endif
852_wi=		wi
853.endif
854
855.if ${MACHINE_ARCH} == "powerpc64"
856.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
857_zfs=		zfs
858.endif
859.endif
860
861.if ${MACHINE_CPUARCH} == "sparc64"
862_auxio=		auxio
863_em=		em
864_epic=		epic
865_i2c=		i2c
866_igb=		igb
867.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
868_opensolaris=	opensolaris
869.endif
870_smbfs=		smbfs
871_sound=		sound
872.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
873_zfs=		zfs
874.endif
875.endif
876
877.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
878SUBDIR=${MODULES_OVERRIDE}
879.endif
880
881.for reject in ${WITHOUT_MODULES}
882SUBDIR:= ${SUBDIR:N${reject}}
883.endfor
884
885# Calling kldxref(8) for each module is expensive.
886.if !defined(NO_XREF)
887.MAKEFLAGS+=	-DNO_XREF
888afterinstall:
889	@if type kldxref >/dev/null 2>&1; then \
890		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
891		kldxref ${DESTDIR}${KMODDIR}; \
892	fi
893.endif
894
895.include <bsd.subdir.mk>
896