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