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