Makefile revision 1.196
1#	$NetBSD: Makefile,v 1.196 2017/12/09 08:03:07 pgoyette Exp $
2
3.include <bsd.own.mk>
4
5# For all platforms
6
7SUBDIR=		accf_dataready
8SUBDIR+=	accf_httpready
9SUBDIR+=	adosfs
10SUBDIR+=	aio
11SUBDIR+=	audio
12SUBDIR+=	blowfish
13SUBDIR+=	bpf
14SUBDIR+=	bpf_filter
15SUBDIR+=	bufq_disksort
16SUBDIR+=	bufq_fcfs
17SUBDIR+=	bufq_priocscan
18SUBDIR+=	bufq_readprio
19SUBDIR+=	camellia
20SUBDIR+=	cast128
21SUBDIR+=	ccd
22SUBDIR+=	cd9660
23SUBDIR+=	cgd
24SUBDIR+=	chfs
25SUBDIR+=	clockctl
26SUBDIR+=	crypto
27SUBDIR+=	coda
28SUBDIR+=	coda5
29SUBDIR+=	compat
30SUBDIR+=	compat_ossaudio
31SUBDIR+=	coredump
32SUBDIR+=	dbcool
33SUBDIR+=	des
34SUBDIR+=	dk_subr
35SUBDIR+=	drvctl
36SUBDIR+=	efs
37SUBDIR+=	ext2fs
38SUBDIR+=	exec_script
39SUBDIR+=	fdesc
40SUBDIR+=	ffs
41SUBDIR+=	filecore
42SUBDIR+=	filemon
43SUBDIR+=	flash
44SUBDIR+=	fss
45SUBDIR+=	gpio
46SUBDIR+=	gpioiic
47SUBDIR+=	gpioow
48SUBDIR+=	gpiosim
49SUBDIR+=	hfs
50SUBDIR+=	hythygtemp
51SUBDIR+=	i2cexec
52SUBDIR+=	i2c_bitbang
53SUBDIR+=	if_agr
54SUBDIR+=	if_axe
55SUBDIR+=	if_axen
56SUBDIR+=	if_faith
57SUBDIR+=	if_gif
58SUBDIR+=	if_gre
59SUBDIR+=	if_l2tp
60SUBDIR+=	if_loop
61SUBDIR+=	if_mpls
62SUBDIR+=	if_npflog
63SUBDIR+=	if_ppp
64SUBDIR+=	if_pppoe
65SUBDIR+=	if_sl
66SUBDIR+=	if_smsc
67SUBDIR+=	if_srt
68SUBDIR+=	if_stf
69SUBDIR+=	if_strip
70SUBDIR+=	if_tun tun
71SUBDIR+=	if_vlan
72SUBDIR+=	iic
73SUBDIR+=	ip_ecn
74SUBDIR+=	ipl
75SUBDIR+=	kernfs
76SUBDIR+=	layerfs
77SUBDIR+=	lfs
78SUBDIR+=	lua
79SUBDIR+=	luasystm
80SUBDIR+=	luapmf
81SUBDIR+=	mfs
82SUBDIR+=	midi
83SUBDIR+=	miiverbose
84SUBDIR+=	miniroot
85SUBDIR+=	mqueue
86SUBDIR+=	msdos
87SUBDIR+=	nand
88SUBDIR+=	nandemulator
89SUBDIR+=	nfs
90SUBDIR+=	nfsserver
91SUBDIR+=	nilfs
92SUBDIR+=	npf
93SUBDIR+=	npf_alg_icmp
94SUBDIR+=	npf_ext_log
95SUBDIR+=	npf_ext_normalize
96SUBDIR+=	npf_ext_rndblock
97SUBDIR+=	ntfs
98SUBDIR+=	null
99SUBDIR+=	onewire
100SUBDIR+=	opencrypto
101SUBDIR+=	overlay
102SUBDIR+=	pciverbose
103SUBDIR+=	pf
104SUBDIR+=	ppp_bsdcomp
105SUBDIR+=	ppp_deflate
106SUBDIR+=	procfs
107SUBDIR+=	ptrace
108SUBDIR+=	ptrace_common
109SUBDIR+=	ptyfs
110SUBDIR+=	puffs
111SUBDIR+=	putter
112SUBDIR+=	raid
113SUBDIR+=	scsiverbose
114SUBDIR+=	sdtemp
115SUBDIR+=	secmodel_bsd44
116SUBDIR+=	secmodel_extensions
117SUBDIR+=	secmodel_overlay
118SUBDIR+=	securelevel
119SUBDIR+=	sequencer
120SUBDIR+=	skipjack
121SUBDIR+=	slcompress
122SUBDIR+=	smbfs
123SUBDIR+=	spdmem
124SUBDIR+=	spkr
125SUBDIR+=	sppp_subr
126SUBDIR+=	sysmon
127SUBDIR+=	sysmon_envsys
128SUBDIR+=	sysmon_power
129SUBDIR+=	sysmon_taskq
130SUBDIR+=	sysmon_wdog
131SUBDIR+=	sysvbfs
132SUBDIR+=	sysv_ipc
133SUBDIR+=	suser
134SUBDIR+=	swcrypto
135SUBDIR+=	swsensor
136SUBDIR+=	swwdog
137SUBDIR+=	tmpfs
138SUBDIR+=	ualea
139SUBDIR+=	uatp
140SUBDIR+=	udf
141SUBDIR+=	umap
142SUBDIR+=	union
143SUBDIR+=	usbverbose
144SUBDIR+=	vcoda
145SUBDIR+=	v7fs
146SUBDIR+=	vnd
147SUBDIR+=	wapbl
148SUBDIR+=	wsbell
149SUBDIR+=	zlib
150SUBDIR+=	tprof
151.if (defined(NOTYET))
152SUBDIR+=	hifn		# Builds on architectures with PCI bus
153SUBDIR+=	unionfs
154.endif
155.if ${MKBINUTILS} != "no"
156SUBDIR+=	xldscripts
157.endif
158
159# Machine dependent section
160.if ${MACHINE_ARCH} == "i386" || \
161    ${MACHINE_CPU} == "m68k"
162SUBDIR+=	exec_aout
163.endif
164
165.if ${MACHINE_ARCH} != "alpha" && \
166    ${MACHINE_CPU} != "aarch64" && \
167    ${MACHINE_ARCH} != "ia64"
168SUBDIR+=	exec_elf32
169.endif
170
171.if ${MACHINE_CPU} == "aarch64" || \
172    ${MACHINE_ARCH} == "alpha" || \
173    ${MACHINE_ARCH} == "ia64" || \
174    ${MACHINE_ARCH} == "sparc64" || \
175    ${MACHINE_ARCH} == "x86_64"
176SUBDIR+=	exec_elf64
177.endif
178
179.if ${MACHINE_ARCH} == "i386" || \
180    ${MACHINE_ARCH} == "x86_64"
181SUBDIR+=	amdtemp
182SUBDIR+=	coretemp
183SUBDIR+=	est
184SUBDIR+=	hdafg
185SUBDIR+=	hdaudio
186SUBDIR+=	hdaudio_pci
187SUBDIR+=	hdaudioverbose
188SUBDIR+=	hpet
189SUBDIR+=	odcm
190SUBDIR+=	powernow
191SUBDIR+=	tco
192SUBDIR+=	tprof_pmi
193SUBDIR+=	tprof_amdpmi
194SUBDIR+=	vmt
195.endif
196
197.if ${MACHINE_ARCH} == "i386" || \
198    ${MACHINE_ARCH} == "x86_64"
199SUBDIR+=	ubsec		# Builds on architectures with PCI bus
200.endif
201
202.if ${MKSLJIT} != "no"
203# No modules for arm, mips and powerpc yet.
204.if ${MACHINE_ARCH} == "i386" || \
205    ${MACHINE_ARCH} == "x86_64" || \
206    ${MACHINE_ARCH} == "sparc"
207SUBDIR+=	bpfjit
208SUBDIR+=	sljit
209.endif
210.endif
211
212#
213# ACPI modules
214#
215.if ${MACHINE_ARCH} == "i386" || \
216    ${MACHINE_ARCH} == "ia64" || \
217    ${MACHINE_ARCH} == "x86_64"
218SUBDIR+=	acpiverbose
219.endif
220
221.if ${MACHINE_ARCH} == "i386" || \
222    ${MACHINE_ARCH} == "x86_64"
223SUBDIR+=	acpiacad
224SUBDIR+=	acpibat
225SUBDIR+=	acpibut
226SUBDIR+=	acpicpu
227SUBDIR+=	acpidalb
228SUBDIR+=	acpifan
229SUBDIR+=	acpilid
230SUBDIR+=	acpipmtr
231SUBDIR+=	acpitz
232SUBDIR+=	acpivga
233SUBDIR+=	acpiwdrt
234SUBDIR+=	acpiwmi
235SUBDIR+=	aibs
236SUBDIR+=	asus
237SUBDIR+=	fujbp
238SUBDIR+=	fujhk
239SUBDIR+=	hpacel
240SUBDIR+=	hpqlb
241SUBDIR+=	thinkpad
242SUBDIR+=	wmidell
243SUBDIR+=	wmieeepc
244SUBDIR+=	wmihp
245SUBDIR+=	wmimsi
246.endif
247
248.if ${MACHINE_CPU} == "arm" \
249    || (!empty(MACHINE_ARCH:Mmips64*) && !defined(BSD_MK_COMPAT_FILE))
250SUBDIR+=	compat_netbsd32
251SUBDIR+=	compat_netbsd32_mqueue
252SUBDIR+=	compat_netbsd32_nfssrv
253SUBDIR+=	compat_netbsd32_ptrace
254SUBDIR+=	compat_netbsd32_sysvipc
255.endif
256
257.if ${MACHINE_ARCH} == "x86_64"
258SUBDIR+=	compat_linux32
259SUBDIR+=	compat_netbsd32
260SUBDIR+=	compat_netbsd32_mqueue
261SUBDIR+=	compat_netbsd32_nfssrv
262SUBDIR+=	compat_netbsd32_ptrace
263SUBDIR+=	compat_netbsd32_sysvipc
264.endif
265
266.if ${MACHINE_ARCH} == "i386"
267SUBDIR+=	ati_pcigart
268SUBDIR+=	compat_freebsd
269SUBDIR+=	mach64drm
270SUBDIR+=	mgadrm
271SUBDIR+=	nsclpcsio
272SUBDIR+=	padlock
273SUBDIR+=	r128drm
274SUBDIR+=	radeondrm
275SUBDIR+=	savagedrm
276SUBDIR+=	sisdrm
277SUBDIR+=	tdfxdrm
278SUBDIR+=	viac7temp
279SUBDIR+=	viadrm
280SUBDIR+=	viadrmums
281.endif
282
283.if ${MACHINE_ARCH} == "i386" || \
284    ${MACHINE_ARCH} == "x86_64"
285SUBDIR+=	azalia
286SUBDIR+=	compat_linux
287SUBDIR+=	drm
288SUBDIR+=	drmkms
289SUBDIR+=	drmkms_linux
290SUBDIR+=	drmkms_pci
291SUBDIR+=	i915drm
292SUBDIR+=	i915drmkms
293SUBDIR+=	pad
294#
295# ISA modules
296#
297SUBDIR+=	aps
298SUBDIR+=	finsio
299SUBDIR+=	itesio
300SUBDIR+=	lm
301SUBDIR+=	lm_isa
302SUBDIR+=	lm_isa_common
303SUBDIR+=	lm_wbsio
304SUBDIR+=	wbsio
305.endif
306
307.if ${MACHINE_CPU} == "m68k"
308SUBDIR+=	compat_aoutm68k
309#SUBDIR+=	compat_linux
310#SUBDIR+=	compat_sunos
311#SUBDIR+=	compat_svr4
312.endif
313
314.if ${MACHINE_ARCH} == "i386" || \
315    ${MACHINE_ARCH} == "x86_64" || \
316    ${MACHINE_ARCH} == "sparc64"
317SUBDIR+=	pwdog
318.endif
319
320.include <bsd.own.mk>
321
322#
323# NetBSD/usermode support
324#
325.if ${MACHINE_ARCH} == "i386" || \
326    ${MACHINE_ARCH} == "x86_64"
327SUBDIR+=	../arch/usermode/modules/syscallemu
328.endif
329
330# we need our device mapper for LVM
331.if (${MKLVM} != "no")
332SUBDIR+= 	dm
333.endif
334
335.if (${MKDTRACE} != "no")
336SUBDIR+=	cyclic
337SUBDIR+=	dtrace
338.endif
339
340# we need solaris for the dtrace and zfs modules
341.if (${MKDTRACE} != "no" || ${MKZFS} != "no")
342SUBDIR+=        solaris
343.endif
344
345.if (${MKZFS} != "no")
346SUBDIR+=	zfs
347.endif
348
349.if (${MKCOMPATMODULES} != "no")
350SUBDIR+=	arch
351.endif
352
353#
354# DTV modules
355#
356SUBDIR+=	dtv
357SUBDIR+=	dtv_math
358.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
359# tuners/demods
360SUBDIR+=	au8522
361SUBDIR+=	cx24227
362SUBDIR+=	lg3303
363SUBDIR+=	mt2131
364SUBDIR+=	nxt2k
365SUBDIR+=	tvpll
366SUBDIR+=	xc3028
367SUBDIR+=	xc5k
368SUBDIR+=	zl10353
369# hardware drivers
370SUBDIR+=	auvitek
371SUBDIR+=	coram
372SUBDIR+=	cxdtv
373SUBDIR+=	emdtv
374.endif
375
376.if (${MKISCSI} != "no")
377SUBDIR+=	iscsi
378.endif
379
380# For now, all of these are disabled, pending resolution of how to deal
381# with attachment-specific modules and bus-specific modules (as opposed
382# to machine- or architecture-specific modules)
383
384.if 0
385SUBDIR+=	aac
386SUBDIR+=	amr
387SUBDIR+=	ataraid
388SUBDIR+=	cac
389SUBDIR+=	cac_eisa
390SUBDIR+=	cac_pci
391SUBDIR+=	if_vioif
392SUBDIR+=	ld
393SUBDIR+=	ld_aac
394SUBDIR+=	ld_amr
395SUBDIR+=	ld_ataraid
396SUBDIR+=	ld_cac
397SUBDIR+=	ld_icp
398SUBDIR+=	ld_mlx
399SUBDIR+=	ld_sdmmc
400SUBDIR+=	ld_twa
401SUBDIR+=	ld_twe
402SUBDIR+=	ld_virtio
403SUBDIR+=	mlx
404SUBDIR+=	mlx_eisa
405SUBDIR+=	mlx_pci
406SUBDIR+=	ld_nvme
407SUBDIR+=	nvme
408SUBDIR+=	twa
409SUBDIR+=	twe
410SUBDIR+=	viomb
411SUBDIR+=	virtio
412SUBDIR+=	vioscsi
413.endif
414
415SUBDIR+=	examples	# build these regularly to avoid bit-rot
416
417.include <bsd.subdir.mk>
418