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