xref: /freebsd/sys/modules/Makefile (revision 729362425c09cf6b362366aabc6fb547eee8035a)
1# $FreeBSD$
2
3.if exists(${.CURDIR}/../opencrypto) && !defined(NOCRYPT)
4_crypto=	crypto
5_cryptodev=	cryptodev
6.endif
7.if exists(${.CURDIR}/../crypto) && !defined(NOCRYPT)
8_random=	random
9.endif
10
11SUBDIR=	accf_data \
12	accf_http \
13	aha \
14	aic7xxx \
15	aio \
16	amr \
17	an \
18	aue \
19	bge \
20	bridge \
21	cam \
22	ccd \
23	cd9660 \
24	coda \
25	${_crypto} \
26	${_cryptodev} \
27	cue \
28	dc \
29	de \
30	digi \
31	dummynet \
32	fdc \
33	fdescfs \
34	firewire \
35	fxp \
36	gx \
37	hifn \
38	if_disc \
39	if_ef \
40	if_faith \
41	if_gif \
42	if_gre \
43	if_ppp \
44	if_sl \
45	if_stf \
46	if_tap \
47	if_tun \
48	if_vlan \
49	ip6fw \
50	ip_mroute_mod \
51	ipfw \
52	isp \
53	ispfw \
54	joy \
55	kue \
56	lge \
57	libiconv \
58	libmchain \
59	lpt \
60	mac_biba \
61	mac_bsdextended \
62	mac_ifoff \
63	mac_lomac \
64	mac_mls \
65	mac_none \
66	mac_partition \
67	mac_portacl \
68	mac_seeotheruids \
69	mac_test \
70	mcd \
71	md \
72	mii \
73	mlx \
74	mpt \
75	msdosfs \
76	my \
77	nfsclient \
78	nfsserver \
79	nge \
80	nmdm \
81	ntfs \
82	nullfs \
83	pcn \
84	plip \
85	portalfs \
86	ppbus \
87	ppi \
88	pps \
89	procfs \
90	pseudofs \
91	raidframe \
92	${_random} \
93	rc \
94	rc4 \
95	rl \
96	rp \
97	sf \
98	sis \
99	sk \
100	sn \
101	snp \
102	ste \
103	sym \
104	sysvipc \
105	ti \
106	tl \
107	trm \
108	twe \
109	tx \
110	txp \
111	ubsa \
112	ubsec \
113	ucom \
114	udbp \
115	udf \
116	ufm \
117	uftdi \
118	ugen \
119	uhid \
120	ukbd \
121	ulpt \
122	umapfs \
123	umass \
124	umodem \
125	ums \
126	unionfs \
127	uplcom \
128	urio \
129	usb \
130	uscanner \
131	uvisor \
132	uvscom \
133	vpo \
134	vr \
135	vx \
136	wb \
137	wlan \
138	xl
139
140.if defined(WANT_EXT2FS_MODULE)
141SUBDIR+=ext2fs
142.endif
143
144.if !defined(NO_IPFILTER)
145SUBDIR+=ipfilter
146.endif
147
148.if ${MACHINE_ARCH} != "sparc64"
149SUBDIR+=syscons
150.endif
151
152# XXX some of these can move to the general case when de-i386'ed
153# XXX some of these can move now, but are untested on other architectures.
154.if ${MACHINE_ARCH} == "i386"
155SUBDIR+=3dfx \
156	agp \
157	aic \
158	aout \
159	apm \
160	ar \
161	arcnet \
162	awi \
163	bktr \
164	coff \
165	dpt \
166	drm \
167	ed \
168	elink \
169	em \
170	ep \
171	ex \
172	fe \
173	fpu \
174	gnufpu \
175	hea \
176	hfa \
177	ibcs2 \
178	idt \
179	ie \
180	linprocfs \
181	linux \
182	lnc \
183	ncp \
184	ncv \
185	netgraph \
186	nsp \
187	nwfs \
188	oltr \
189	pccard \
190	pecoff \
191	ray \
192	sbni \
193	scsi_low \
194	smbfs \
195	sound \
196	speaker \
197	splash \
198	sppp \
199	sr \
200	stg \
201	streams \
202	vinum \
203	wi \
204	xe
205
206.if ${MACHINE} == "i386"
207SUBDIR+=aac \
208	acpi \
209	asr \
210	bios \
211	cardbus \
212	cbb \
213	ciss \
214	cm \
215	el \
216	exca \
217	iir \
218	mly \
219	s3 \
220	vesa
221
222.elif ${MACHINE} == "pc98"
223SUBDIR+=canbepm \
224	canbus \
225	pmc \
226	snc
227.endif
228.endif
229
230.if ${MACHINE_ARCH} == "ia64"
231# Modules not enabled on ia64 (as compared to i386) include:
232#	aac acpi aout apm atspeaker drm fpu gnufpu ibcs2 linprocfs linux ncv
233#	nsp oltr pecoff s3 sbni stg vesa
234SUBDIR+=aic \
235	ar \
236	arcnet \
237	asr \
238	bktr \
239	cardbus \
240	cbb \
241	ciss \
242	cm \
243	coff \
244	el \
245	em \
246	ep \
247	exca \
248	fe \
249	hea \
250	hfa \
251	iir \
252	mly \
253	netgraph \
254	pccard \
255	ray \
256	rc \
257	scsi_low \
258	smbfs \
259	sound \
260	splash \
261	sppp \
262	sr \
263	streams \
264	vinum \
265	wi \
266	xe
267.endif
268
269.if ${MACHINE_ARCH} == "alpha"
270SUBDIR+=agp \
271	linprocfs \
272	linux \
273	osf1 \
274	sound \
275	sppp \
276	vinum
277.endif
278
279.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
280SUBDIR+=gem
281.endif
282
283.if ${MACHINE_ARCH} == "sparc64"
284SUBDIR+=hme
285.endif
286
287.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
288SUBDIR=${MODULES_OVERRIDE}
289.endif
290
291# Calling kldxref(8) for each module is expensive.
292.if !defined(NO_XREF)
293.MAKEFLAGS+=	-DNO_XREF
294afterinstall:
295	@if type kldxref >/dev/null 2>&1; then \
296		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
297		kldxref ${DESTDIR}${KMODDIR}; \
298	fi
299.endif
300
301.include <bsd.subdir.mk>
302