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