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