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