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