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