xref: /freebsd/sys/modules/Makefile (revision 0bc7cf6fde4083c1a0cdf29b26075699028909e0)
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	sge \
279	siba_bwn \
280	siftr \
281	siis \
282	sis \
283	sk \
284	${_smbfs} \
285	sn \
286	${_snc} \
287	snp \
288	${_sound} \
289	${_speaker} \
290	${_splash} \
291	${_sppp} \
292	ste \
293	${_stg} \
294	stge \
295	${_streams} \
296	${_svr4} \
297	${_sym} \
298	${_syscons} \
299	sysvipc \
300	ti \
301	tl \
302	tmpfs \
303	${_tpm} \
304	trm \
305	${_twa} \
306	twe \
307	tws \
308	tx \
309	txp \
310	uart \
311	ubsec \
312	udf \
313	udf_iconv \
314	ufs \
315	unionfs \
316	usb \
317	utopia \
318	${_vesa} \
319	vge \
320	vkbd \
321	${_vpo} \
322	vr \
323	vte \
324	vx \
325	${_vxge} \
326	wb \
327	${_wi} \
328	wlan \
329	wlan_acl \
330	wlan_amrr \
331	wlan_ccmp \
332	wlan_rssadapt \
333	wlan_tkip \
334	wlan_wep \
335	wlan_xauth \
336	${_wpi} \
337	${_wpifw} \
338	${_x86bios} \
339	${_xe} \
340	xfs \
341	xl \
342	${_zfs} \
343	zlib \
344
345.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \
346	${MACHINE_CPUARCH} != "mips"
347_syscons=	syscons
348_vpo=		vpo
349.endif
350
351.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
352# no BUS_SPACE_UNSPECIFIED
353# No barrier instruction support (specific to this driver)
354_sym=		sym
355# intr_disable() is a macro, causes problems
356_cxgb=		cxgb
357.endif
358
359.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
360.if exists(${.CURDIR}/../opencrypto)
361_crypto=	crypto
362_cryptodev=	cryptodev
363.endif
364.if exists(${.CURDIR}/../crypto)
365_random=	random
366.endif
367.endif
368
369.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
370_if_gre=	if_gre
371.endif
372
373.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
374	defined(ALL_MODULES)
375_if_carp=	if_carp
376.endif
377
378.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
379_ipfilter=	ipfilter
380.endif
381
382.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
383_netgraph=	netgraph
384.endif
385
386.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
387	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
388_pf=		pf
389_pflog=		pflog
390.if ${MK_INET_SUPPORT} != "no"
391_pfsync=	pfsync
392.endif
393.endif
394
395.if ${MACHINE_CPUARCH} == "i386"
396# XXX some of these can move to the general case when de-i386'ed
397# XXX some of these can move now, but are untested on other architectures.
398_3dfx=		3dfx
399_3dfx_linux=	3dfx_linux
400_agp=		agp
401_aic=		aic
402_amd=		amd
403_an=		an
404_aout=		aout
405_apm=		apm
406_arcnet=	arcnet
407_bktr=		bktr
408_bxe=		bxe
409_cardbus=	cardbus
410_cbb=		cbb
411_ce=		ce
412_coff=		coff
413_cp=		cp
414_cpuctl=	cpuctl
415_cpufreq=	cpufreq
416_cs=		cs
417.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
418_cyclic=	cyclic
419.endif
420_dpms=		dpms
421_drm=		drm
422.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
423_dtrace=	dtrace
424.endif
425_ed=		ed
426_elink=		elink
427_em=		em
428_ep=		ep
429_et=		et
430_exca=		exca
431_ext2fs=	ext2fs
432_fe=		fe
433_glxiic=	glxiic
434_glxsb=		glxsb
435_i2c=		i2c
436_ibcs2=		ibcs2
437_ie=		ie
438_if_ndis=	if_ndis
439_igb=		igb
440_io=		io
441_lindev=	lindev
442_linprocfs=	linprocfs
443_linsysfs=	linsysfs
444_linux=		linux
445_mse=		mse
446.if ${MK_OFED} != "no" || defined(ALL_MODULES)
447_mlx4=		mlx4
448_mlx4ib=	mlx4ib
449_mlxen=		mlxen
450_mthca=		mthca
451.endif
452.if ${MK_NCP} != "no"
453_ncp=		ncp
454.endif
455_ncv=		ncv
456_ndis=		ndis
457_nsp=		nsp
458.if ${MK_NCP} != "no"
459_nwfs=		nwfs
460.endif
461.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
462_opensolaris=	opensolaris
463.endif
464_pccard=	pccard
465_pcfclock=	pcfclock
466_pst=		pst
467_rdma=		rdma
468_safe=		safe
469_sbni=		sbni
470_scsi_low=	scsi_low
471_smbfs=		smbfs
472_sound=		sound
473_speaker=	speaker
474_splash=	splash
475_sppp=		sppp
476_stg=		stg
477_streams=	streams
478_svr4=		svr4
479_vxge=  	vxge
480_wi=		wi
481_xe=		xe
482.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
483_zfs=		zfs
484.endif
485.if ${MACHINE} == "i386"
486_aac=		aac
487_acpi=		acpi
488.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
489_aesni=		aesni
490.endif
491_ahb=		ahb
492_amdsbwd=	amdsbwd
493_amdtemp=	amdtemp
494_arcmsr=	arcmsr
495_asmc=		asmc
496_asr=		asr
497_bios=		bios
498_ciss=		ciss
499_cm=		cm
500_cmx=		cmx
501_coretemp=	coretemp
502_ctau=		ctau
503_dpt=		dpt
504_ex=		ex
505_hptiop=	hptiop
506_hptmv=		hptmv
507_hptrr=		hptrr
508_ichwd=		ichwd
509_ida=		ida
510_iir=		iir
511_ipmi=		ipmi
512_ips=		ips
513_ipw=		ipw
514_ipwfw=		ipwfw
515_iwi=		iwi
516_iwifw=		iwifw
517_iwn=		iwn
518_iwnfw=		iwnfw
519_ixgb=		ixgb
520_ixgbe=		ixgbe
521_mly=		mly
522_nfe=		nfe
523_nve=		nve
524_nvram=		nvram
525_nxge=		nxge
526_tpm=		tpm
527_wpi=		wpi
528_wpifw=		wpifw
529.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
530_padlock=	padlock
531.endif
532_s3=		s3
533_twa=		twa
534_vesa=		vesa
535_x86bios=	x86bios
536.elif ${MACHINE} == "pc98"
537_canbepm=	canbepm
538_canbus=	canbus
539_pmc=		pmc
540_snc=		snc
541.endif
542.endif
543
544.if ${MACHINE_CPUARCH} == "amd64"
545_aac=		aac
546_aout=		aout
547_acpi=		acpi
548.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
549_aesni=		aesni
550.endif
551_agp=		agp
552_an=		an
553_amdsbwd=	amdsbwd
554_amdtemp=	amdtemp
555_arcmsr=	arcmsr
556_asmc=		asmc
557_bxe=		bxe
558_cardbus=	cardbus
559_cbb=		cbb
560_cmx=		cmx
561_ciss=		ciss
562_coretemp=	coretemp
563_cpuctl=	cpuctl
564_cpufreq=	cpufreq
565.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
566_cyclic=	cyclic
567.endif
568_dpms=		dpms
569_drm=		drm
570.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
571_dtrace=	dtrace
572.endif
573_ed=		ed
574_et=		et
575_em=		em
576_exca=		exca
577_ext2fs=	ext2fs
578_hptiop=	hptiop
579_hptmv=		hptmv
580_hptrr=		hptrr
581_i2c=		i2c
582_ichwd=		ichwd
583_ida=		ida
584_if_ndis=	if_ndis
585_igb=		igb
586_iir=		iir
587_io=		io
588_ipmi=		ipmi
589_ips=		ips
590_ipw=		ipw
591_ipwfw=		ipwfw
592_iwi=		iwi
593_iwifw=		iwifw
594_iwn=		iwn
595_iwnfw=		iwnfw
596_ixgb=		ixgb
597_ixgbe=		ixgbe
598_lindev=	lindev
599_linprocfs=	linprocfs
600_linsysfs=	linsysfs
601_linux=		linux
602_mly=		mly
603.if ${MK_OFED} != "no" || defined(ALL_MODULES)
604_mlx4=		mlx4
605_mlx4ib=	mlx4ib
606_mlxen=		mlxen
607_mthca=		mthca
608.endif
609_ndis=		ndis
610_nfe=		nfe
611_nve=		nve
612_nvram=		nvram
613_nxge=		nxge
614.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
615_opensolaris=	opensolaris
616.endif
617.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
618_padlock=	padlock
619.endif
620_pccard=	pccard
621_qlxgb=		qlxgb
622_rdma=		rdma
623_s3=		s3
624_safe=		safe
625_scsi_low=	scsi_low
626_smbfs=		smbfs
627_sound=		sound
628_speaker=	speaker
629_splash=	splash
630_sppp=		sppp
631_tpm=		tpm
632_twa=		twa
633_vesa=		vesa
634_vxge=  	vxge
635_x86bios=	x86bios
636_wi=		wi
637_wpi=		wpi
638_wpifw=		wpifw
639.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
640_zfs=		zfs
641.endif
642.endif
643
644.if ${MACHINE_CPUARCH} == "ia64"
645_aac=		aac
646_aic=		aic
647_an=		an
648_arcnet=	arcnet
649_asr=		asr
650_bktr=		bktr
651_cardbus=	cardbus
652_cbb=		cbb
653_ciss=		ciss
654_cm=		cm
655_cmx=		cmx
656_coff=		coff
657_cpufreq=	cpufreq
658_dpt=		dpt
659_em=		em
660_ep=		ep
661_et=		et
662_exca=		exca
663_fe=		fe
664_hptiop=	hptiop
665_ida=		ida
666_igb=		igb
667_iir=		iir
668_ips=		ips
669_mly=		mly
670_pccard=	pccard
671_scsi_low=	scsi_low
672_smbfs=		smbfs
673_sound=		sound
674_splash=	splash
675_sppp=		sppp
676_streams=	streams
677_tpm=		tpm
678_twa=		twa
679_wi=		wi
680_xe=		xe
681.endif
682
683.if ${MACHINE_CPUARCH} == "powerpc"
684_agp=		agp
685_an=		an
686_bm=		bm
687_cpufreq=	cpufreq
688_nvram=		powermac_nvram
689_smbfs=		smbfs
690_sound=		sound
691.endif
692
693.if ${MACHINE_ARCH} == "powerpc64"
694.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
695_opensolaris=	opensolaris
696.endif
697.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
698_zfs=		zfs
699.endif
700.endif
701
702.if ${MACHINE_CPUARCH} == "sparc64"
703_auxio=		auxio
704_em=		em
705_epic=		epic
706_i2c=		i2c
707_igb=		igb
708.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
709_opensolaris=	opensolaris
710.endif
711_smbfs=		smbfs
712_sound=		sound
713.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
714_zfs=		zfs
715.endif
716.endif
717
718.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
719SUBDIR=${MODULES_OVERRIDE}
720.endif
721
722.for reject in ${WITHOUT_MODULES}
723SUBDIR:= ${SUBDIR:N${reject}}
724.endfor
725
726# Calling kldxref(8) for each module is expensive.
727.if !defined(NO_XREF)
728.MAKEFLAGS+=	-DNO_XREF
729afterinstall:
730	@if type kldxref >/dev/null 2>&1; then \
731		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
732		kldxref ${DESTDIR}${KMODDIR}; \
733	fi
734.endif
735
736.include <bsd.subdir.mk>
737