Makefile revision 1.244
1#	$NetBSD: Makefile,v 1.244 2016/06/05 01:20:58 christos Exp $
2#	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
3
4.include <bsd.own.mk>
5
6SUBDIR=		csu .WAIT
7
8.if (${MKGCC} != "no")
9SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
10.endif
11
12SUBDIR+=	libc
13SUBDIR+=	.WAIT
14
15#
16# The SUBDIRs above are included here for completeness but should be built
17# and installed prior to make(dependall) in this file, as libraries listed
18# below will depend on versions from DESTDIR only.
19#
20
21SUBDIR+=	i18n_module
22
23SUBDIR+=	libarch \
24		libbluetooth libbsdmalloc libbz2 \
25		libcompat libcrypt \
26		libintl libipsec libkvm libm \
27		libossaudio libpci libpmc libposix libprop libpthread \
28		libpthread_dbg libpuffs libresolv librmt librpcsvc librt \
29		libtelnet libterminfo \
30		libusbhid libutil libwrap liby libz
31
32.if !defined(BSD_MK_COMPAT_FILE)
33SUBDIR+=	libkern
34.endif
35
36.if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
37LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
38LIBC_MACHINE_CPU?=${MACHINE_CPU}
39.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
40SUBDIR+=	libc_vfp
41.endif
42.endif
43.if (${MKRUMP} != "no")
44SUBDIR+=	librumpclient
45.endif
46.if (${MKSKEY} != "no")
47SUBDIR+=	libskey
48.endif
49
50.if (${MKMDNS} != "no")
51SUBDIR+=	../external/apache2/mDNSResponder/lib
52.endif
53
54SUBDIR+=	../external/bsd/am-utils/lib
55
56SUBDIR+=	../external/bsd/flex/lib
57SUBDIR+=	../external/bsd/tre/lib
58SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
59SUBDIR+=	../external/bsd/liblzf/lib
60SUBDIR+=	../external/bsd/libpcap/lib
61
62.if ${MKSLJIT} != "no"
63SUBDIR+=	../external/bsd/sljit/lib
64SUBDIR+=	libbpfjit
65.endif
66
67.if (${MKZFS} != "no")
68SUBDIR+=        ../external/cddl/osnet/lib/libavl
69SUBDIR+=        ../external/cddl/osnet/lib/libnvpair
70SUBDIR+=        ../external/cddl/osnet/lib/libumem
71SUBDIR+=        ../external/cddl/osnet/lib/libuutil
72.endif
73
74SUBDIR+=	../external/mit/expat/lib
75
76SUBDIR+=	../external/public-domain/sqlite/lib
77
78SUBDIR+=	../external/gpl2/libmalloc
79
80.if (${MKGCC} != "no")
81SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
82SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
83. if ${HAVE_GCC} == 48
84SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap
85SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth
86. endif
87# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
88# specific build area, but we get better parallelism this way.
89# We don't build compat versions of these.
90. if !defined(MLIBDIR)
91SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
92SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
93SUBDIR+=	../external/lgpl3/mpc/lib/libmpc
94. endif
95.endif
96
97#
98# Libraries that depend upon any listed previously
99# (and those that depend upon these [and ...])
100#
101#==================== 1st library dependency barrier ====================
102SUBDIR+=	.WAIT
103
104.if ${MKDTRACE} != "no"
105SUBDIR+=	../external/bsd/librtld_db/lib		# depends on libutil
106.endif
107
108.if ${MKCTF} != "no"
109SUBDIR+=        ../external/cddl/osnet/lib/libctf
110.endif
111
112SUBDIR+=	../external/public-domain/xz/lib	# depends on libpthread
113
114.if (${MKCRYPTO} != "no")
115SUBDIR+=	../crypto/external/bsd/netpgp/libmj
116SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
117.endif
118
119SUBDIR+=	../external/bsd/blacklist/lib		# depends on libpthread
120SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
121SUBDIR+=	../external/mit/lua/lib # depends on libm
122SUBDIR+=	libcurses	# depends on libterminfo
123SUBDIR+=	libdm		# depends on libprop
124SUBDIR+=	libedit		# depends on libterminfo
125SUBDIR+=	libexecinfo 	# depends on libelf
126SUBDIR+=	libppath	# depends on libprop
127SUBDIR+=	libperfuse	# depends on libpuffs
128SUBDIR+=	libquota	# depends on libprop and librpcsvc
129SUBDIR+=	librefuse	# depends on libpuffs
130SUBDIR+=	libisns 	# depends on libpthread
131.if (${MKRUMP} != "no")
132SUBDIR+=	librumpuser	# depends on libpthread
133SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
134.endif
135
136.if (${MKNPF} != "no")
137SUBDIR+=	libnpf		# depends on libprop
138.endif
139
140.if (${MKCRYPTO} != "no")
141SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
142.endif
143
144SUBDIR+=	../external/bsd/file/lib	# depends on libz
145
146.if (${MKISCSI} != "no")
147SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
148.endif
149
150.if (${MKZFS} != "no")
151SUBDIR+=        ../external/cddl/osnet/lib/libzfs
152SUBDIR+=        ../external/cddl/osnet/lib/libzpool
153.endif
154
155.if (${MKLVM} != "no")
156SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
157.endif
158
159.if (${MKBINUTILS} != "no")
160SUBDIR+=	../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib	# libbfd depends on libz
161.endif
162
163.if (${MKLIBCXX} != "no")
164SUBDIR+=	../external/bsd/libc++
165.endif
166
167.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
168SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
169SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
170.endif
171
172#==================== 2nd library dependency barrier ====================
173SUBDIR+=	.WAIT
174
175SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libasan
176SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libubsan
177
178SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
179
180.if (${MKNPF} != "no")
181SUBDIR+=	npf		# depends on libnpf
182.endif
183
184.if (${MKATF} != "no")
185SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
186.endif
187
188.if (${MKKYUA} != "no")
189SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
190.endif
191
192SUBDIR+=	libform		# depends on libcurses
193SUBDIR+=	libmenu		# depends on libcurses
194SUBDIR+=	libpanel	# depends on libcurses
195SUBDIR+=	libradius	# depends on libcrypto if (${MKCRYPTO} != "no")
196.if (${MKRUMP} != "no")
197SUBDIR+=	librump		# depends on librumpuser
198.endif
199
200.if (${MKKERBEROS} != "no")
201SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
202							# libedit, libterminfo,
203.endif
204
205.if (${MKCRYPTO} != "no")
206SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
207SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
208.endif
209
210SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
211.if ${MKDTRACE} != "no"
212SUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
213.endif
214SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
215
216.if (${MKLDAP} != "no")
217SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
218.endif
219
220#==================== 3rd library dependency barrier ====================
221SUBDIR+=	.WAIT
222
223SUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
224
225.if ${MKDTRACE} != "no"
226SUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
227.endif
228
229.if (${MKRUMP} != "no")
230SUBDIR+=	librumpdev	# depends on librump
231SUBDIR+=	librumpnet	# depends on librump
232SUBDIR+=	librumpvfs	# depends on librump
233.endif
234
235.if (${MKPAM} != "no")
236SUBDIR+=	libpam		# depends on heimdal
237.endif
238
239.if (${MKCRYPTO} != "no")
240SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
241.endif
242
243SUBDIR+=	../external/bsd/mdocml/lib
244
245.if (${MKRUMP} != "no")
246#==================== 4th library dependency barrier ====================
247SUBDIR+=	.WAIT
248
249SUBDIR+=	libukfs		# depends on librumpvfs, librump
250
251.if (${MKTPM} != "no")
252SUBDIR+=	../crypto/external/cpl/trousers/lib
253.endif
254
255#==================== 5th library dependency barrier ====================
256SUBDIR+=	.WAIT
257
258SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
259
260.if (${MKTPM} != "no")
261SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
262.endif
263
264.if !defined(BSD_MK_COMPAT_FILE)
265SUBDIR+=	../sys/rump/dev/lib
266SUBDIR+=	../sys/rump/fs/lib
267SUBDIR+=	../sys/rump/kern/lib
268SUBDIR+=	../sys/rump/net/lib
269.endif
270.endif
271
272# Lua bindings come last, they might depend on anything
273SUBDIR+=	lua
274
275# Needed by rump and rescue which are outside the smbfs tree
276SUBDIR+=	../external/bsd/smbfs/lib
277
278.include <bsd.buildinstall.mk>
279.include <bsd.subdir.mk>
280