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