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