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