Makefile revision 1.292 1 1.292 christos # $NetBSD: Makefile,v 1.292 2021/04/25 23:43:48 christos Exp $
2 1.8 mycroft # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
3 1.21 cgd
4 1.62 thorpej .include <bsd.own.mk>
5 1.62 thorpej
6 1.188 joerg SUBDIR= csu .WAIT
7 1.155 plunky
8 1.155 plunky .if (${MKGCC} != "no")
9 1.211 mrg SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
10 1.155 plunky .endif
11 1.155 plunky
12 1.155 plunky SUBDIR+= libc
13 1.155 plunky SUBDIR+= .WAIT
14 1.155 plunky
15 1.155 plunky #
16 1.155 plunky # The SUBDIRs above are included here for completeness but should be built
17 1.155 plunky # and installed prior to make(dependall) in this file, as libraries listed
18 1.155 plunky # below will depend on versions from DESTDIR only.
19 1.155 plunky #
20 1.155 plunky
21 1.158 plunky SUBDIR+= i18n_module
22 1.158 plunky
23 1.158 plunky SUBDIR+= libarch \
24 1.158 plunky libbluetooth libbsdmalloc libbz2 \
25 1.184 matt libcompat libcrypt \
26 1.265 martin libintl libipsec libkvm libm \
27 1.259 maxv libossaudio libpci libposix libprop libpthread \
28 1.249 kamil libpuffs libresolv librmt librpcsvc librt \
29 1.187 christos libtelnet libterminfo \
30 1.287 christos libusbhid libutil liby libz
31 1.158 plunky
32 1.206 matt .if !defined(BSD_MK_COMPAT_FILE)
33 1.206 matt SUBDIR+= libkern
34 1.206 matt .endif
35 1.206 matt
36 1.226 matt .if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
37 1.201 matt LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
38 1.228 joerg LIBC_MACHINE_CPU?=${MACHINE_CPU}
39 1.228 joerg .if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
40 1.197 matt SUBDIR+= libc_vfp
41 1.197 matt .endif
42 1.201 matt .endif
43 1.292 christos .if ${MACHINE_MIPS64}
44 1.247 macallan SUBDIR+= libc_fp
45 1.247 macallan .endif
46 1.187 christos .if (${MKRUMP} != "no")
47 1.187 christos SUBDIR+= librumpclient
48 1.187 christos .endif
49 1.158 plunky .if (${MKSKEY} != "no")
50 1.158 plunky SUBDIR+= libskey
51 1.158 plunky .endif
52 1.60 thorpej
53 1.285 jmcneill .if ${HAVE_NVMM:Uno} == "yes" && !defined(MLIBDIR)
54 1.265 martin SUBDIR+= libnvmm
55 1.265 martin .endif
56 1.265 martin
57 1.155 plunky .if (${MKMDNS} != "no")
58 1.155 plunky SUBDIR+= ../external/apache2/mDNSResponder/lib
59 1.155 plunky .endif
60 1.155 plunky
61 1.155 plunky SUBDIR+= ../external/bsd/am-utils/lib
62 1.155 plunky
63 1.155 plunky SUBDIR+= ../external/bsd/flex/lib
64 1.180 christos SUBDIR+= ../external/bsd/tre/lib
65 1.291 jkoshy SUBDIR+= ../external/bsd/elftoolchain/lib
66 1.163 matt SUBDIR+= ../external/bsd/liblzf/lib
67 1.158 plunky SUBDIR+= ../external/bsd/libpcap/lib
68 1.155 plunky
69 1.214 plunky .if ${MKSLJIT} != "no"
70 1.214 plunky SUBDIR+= ../external/bsd/sljit/lib
71 1.214 plunky SUBDIR+= libbpfjit
72 1.214 plunky .endif
73 1.214 plunky
74 1.261 christos SUBDIR+= ../external/bsd/libnv/lib
75 1.261 christos
76 1.224 matt .if (${MKZFS} != "no")
77 1.224 matt SUBDIR+= ../external/cddl/osnet/lib/libavl
78 1.224 matt SUBDIR+= ../external/cddl/osnet/lib/libnvpair
79 1.224 matt SUBDIR+= ../external/cddl/osnet/lib/libumem
80 1.224 matt SUBDIR+= ../external/cddl/osnet/lib/libuutil
81 1.224 matt .endif
82 1.224 matt
83 1.182 tron SUBDIR+= ../external/mit/expat/lib
84 1.155 plunky
85 1.238 christos SUBDIR+= ../external/gpl2/libmalloc
86 1.155 plunky
87 1.269 christos SUBDIR+= ../external/bsd/jemalloc/lib
88 1.269 christos
89 1.155 plunky .if (${MKGCC} != "no")
90 1.211 mrg SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
91 1.211 mrg SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
92 1.173 mrg # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
93 1.173 mrg # specific build area, but we get better parallelism this way.
94 1.215 mrg # We don't build compat versions of these.
95 1.252 mrg . if !defined(MLIBDIR) && (${MKGCCCMDS} != "no")
96 1.172 matt SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
97 1.174 plunky SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
98 1.209 mrg SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
99 1.174 plunky . endif
100 1.155 plunky .endif
101 1.144 christos
102 1.89 lukem #
103 1.89 lukem # Libraries that depend upon any listed previously
104 1.93 lukem # (and those that depend upon these [and ...])
105 1.89 lukem #
106 1.97 christos #==================== 1st library dependency barrier ====================
107 1.97 christos SUBDIR+= .WAIT
108 1.97 christos
109 1.235 christos .if ${MKDTRACE} != "no"
110 1.229 christos SUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil
111 1.234 christos .endif
112 1.229 christos
113 1.240 riastrad .if ${MKCTF} != "no"
114 1.227 christos SUBDIR+= ../external/cddl/osnet/lib/libctf
115 1.227 christos .endif
116 1.227 christos
117 1.221 mrg SUBDIR+= ../external/public-domain/xz/lib # depends on libpthread
118 1.208 mrg SUBDIR+= ../crypto/external/bsd/netpgp/libmj
119 1.208 mrg SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
120 1.284 christos SUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread
121 1.208 mrg SUBDIR+= ../external/mit/lua/lib # depends on libm
122 1.286 nia SUBDIR+= ../external/public-domain/sqlite/lib # depends on libm
123 1.158 plunky SUBDIR+= libcurses # depends on libterminfo
124 1.162 haad SUBDIR+= libdm # depends on libprop
125 1.158 plunky SUBDIR+= libedit # depends on libterminfo
126 1.184 matt SUBDIR+= libexecinfo # depends on libelf
127 1.176 dyoung SUBDIR+= libppath # depends on libprop
128 1.175 plunky SUBDIR+= libperfuse # depends on libpuffs
129 1.165 bouyer SUBDIR+= libquota # depends on libprop and librpcsvc
130 1.113 pooka SUBDIR+= librefuse # depends on libpuffs
131 1.207 joerg SUBDIR+= libisns # depends on libpthread
132 1.187 christos .if (${MKRUMP} != "no")
133 1.253 christos SUBDIR+= librumphijack # depends on librumpclient and libpthread
134 1.253 christos SUBDIR+= librumpres # depends on librumpclient
135 1.126 pooka SUBDIR+= librumpuser # depends on libpthread
136 1.187 christos .endif
137 1.126 pooka
138 1.161 rmind .if (${MKNPF} != "no")
139 1.261 christos SUBDIR+= libnpf # depends on libnv
140 1.161 rmind .endif
141 1.161 rmind
142 1.254 christos SUBDIR+= ../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt
143 1.155 plunky
144 1.155 plunky .if (${MKISCSI} != "no")
145 1.155 plunky SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
146 1.155 plunky .endif
147 1.155 plunky
148 1.224 matt .if (${MKZFS} != "no")
149 1.257 chs SUBDIR+= ../external/cddl/osnet/lib/libzfs_core
150 1.224 matt SUBDIR+= ../external/cddl/osnet/lib/libzpool
151 1.224 matt .endif
152 1.224 matt
153 1.163 matt .if (${MKLVM} != "no")
154 1.163 matt SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
155 1.163 matt .endif
156 1.163 matt
157 1.155 plunky .if (${MKBINUTILS} != "no")
158 1.239 christos SUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz
159 1.155 plunky .endif
160 1.155 plunky
161 1.202 joerg .if (${MKLIBCXX} != "no")
162 1.202 joerg SUBDIR+= ../external/bsd/libc++
163 1.202 joerg .endif
164 1.202 joerg
165 1.203 joerg .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
166 1.211 mrg SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
167 1.211 mrg SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
168 1.155 plunky .endif
169 1.222 christos
170 1.271 nakayama .if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
171 1.273 joerg SUBDIR+= ../external/apache2/llvm/include
172 1.270 joerg .endif
173 1.270 joerg
174 1.275 christos SUBDIR+= ../external/mit/libcbor/lib
175 1.283 christos
176 1.283 christos SUBDIR+= ../external/mit/libuv/lib
177 1.222 christos #==================== 2nd library dependency barrier ====================
178 1.222 christos SUBDIR+= .WAIT
179 1.222 christos
180 1.287 christos SUBDIR+= libwrap
181 1.287 christos
182 1.272 mrg .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
183 1.258 christos .for sanitizer in asan lsan ubsan
184 1.245 christos .if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
185 1.245 christos SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
186 1.245 christos .endif
187 1.245 christos .endfor
188 1.272 mrg .endif
189 1.155 plunky
190 1.271 nakayama .if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
191 1.273 joerg SUBDIR+= ../external/apache2/llvm/librt
192 1.270 joerg .endif
193 1.270 joerg
194 1.221 mrg SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
195 1.221 mrg
196 1.274 christos SUBDIR+= ../external/bsd/file/lib # depends on libz, libbz2, libxz
197 1.274 christos
198 1.208 mrg .if (${MKNPF} != "no")
199 1.208 mrg SUBDIR+= npf # depends on libnpf
200 1.208 mrg .endif
201 1.208 mrg
202 1.185 christos .if (${MKATF} != "no")
203 1.186 christos SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
204 1.185 christos .endif
205 1.185 christos
206 1.198 jmmv .if (${MKKYUA} != "no")
207 1.198 jmmv SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
208 1.198 jmmv .endif
209 1.198 jmmv
210 1.158 plunky SUBDIR+= libform # depends on libcurses
211 1.175 plunky SUBDIR+= libmenu # depends on libcurses
212 1.236 kamil SUBDIR+= libpanel # depends on libcurses
213 1.251 riastrad SUBDIR+= libradius # depends on libcrypto
214 1.187 christos .if (${MKRUMP} != "no")
215 1.175 plunky SUBDIR+= librump # depends on librumpuser
216 1.187 christos .endif
217 1.158 plunky
218 1.100 christos .if (${MKKERBEROS} != "no")
219 1.166 elric SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
220 1.166 elric # libedit, libterminfo,
221 1.100 christos .endif
222 1.100 christos
223 1.275 christos SUBDIR+= ../external/bsd/libfido2/lib # depends on libcbor
224 1.158 plunky SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
225 1.199 christos SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
226 1.235 christos .if ${MKDTRACE} != "no"
227 1.234 christos SUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf
228 1.234 christos .endif
229 1.158 plunky SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
230 1.158 plunky
231 1.158 plunky .if (${MKLDAP} != "no")
232 1.158 plunky SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
233 1.158 plunky .endif
234 1.158 plunky
235 1.257 chs .if (${MKZFS} != "no")
236 1.257 chs SUBDIR+= ../external/cddl/osnet/lib/libzfs
237 1.257 chs .endif
238 1.257 chs
239 1.256 sevan SUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto
240 1.256 sevan
241 1.124 lukem #==================== 3rd library dependency barrier ====================
242 1.124 lukem SUBDIR+= .WAIT
243 1.124 lukem
244 1.275 christos SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz,
245 1.275 christos # libfido2
246 1.255 christos SUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib
247 1.260 christos SUBDIR+= ../external/mpl/bind/lib # depends on heimdal, libcrypto
248 1.283 christos # libuv
249 1.251 riastrad .if ${MKUNBOUND} != "no"
250 1.246 christos SUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto
251 1.246 christos .endif
252 1.204 joerg
253 1.230 christos .if ${MKDTRACE} != "no"
254 1.230 christos SUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc
255 1.230 christos .endif
256 1.230 christos
257 1.187 christos .if (${MKRUMP} != "no")
258 1.143 pooka SUBDIR+= librumpdev # depends on librump
259 1.128 pooka SUBDIR+= librumpnet # depends on librump
260 1.130 pooka SUBDIR+= librumpvfs # depends on librump
261 1.187 christos .endif
262 1.126 pooka
263 1.175 plunky SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
264 1.181 joerg SUBDIR+= ../external/bsd/mdocml/lib
265 1.181 joerg
266 1.126 pooka #==================== 4th library dependency barrier ====================
267 1.126 pooka SUBDIR+= .WAIT
268 1.158 plunky
269 1.277 christos .if (${MKPAM} != "no")
270 1.278 rin SUBDIR+= libpam # depends on heimdal, libssh
271 1.277 christos .endif
272 1.277 christos
273 1.277 christos
274 1.280 christos .if (${MKRUMP} != "no")
275 1.158 plunky SUBDIR+= libukfs # depends on librumpvfs, librump
276 1.280 christos .endif
277 1.131 pooka
278 1.190 christos .if (${MKTPM} != "no")
279 1.190 christos SUBDIR+= ../crypto/external/cpl/trousers/lib
280 1.190 christos .endif
281 1.190 christos
282 1.131 pooka #==================== 5th library dependency barrier ====================
283 1.131 pooka SUBDIR+= .WAIT
284 1.158 plunky
285 1.279 christos .if (${MKPAM} != "no")
286 1.279 christos SUBDIR+= ../external/bsd/pam-u2f/lib # depends on libpam
287 1.279 christos .endif
288 1.279 christos
289 1.281 tnn .if (${MKRUMP} != "no")
290 1.158 plunky SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
291 1.281 tnn .endif
292 1.188 joerg
293 1.192 christos .if (${MKTPM} != "no")
294 1.192 christos SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
295 1.192 christos .endif
296 1.192 christos
297 1.280 christos .if (${MKRUMP} != "no")
298 1.188 joerg .if !defined(BSD_MK_COMPAT_FILE)
299 1.188 joerg SUBDIR+= ../sys/rump/dev/lib
300 1.188 joerg SUBDIR+= ../sys/rump/fs/lib
301 1.188 joerg SUBDIR+= ../sys/rump/kern/lib
302 1.188 joerg SUBDIR+= ../sys/rump/net/lib
303 1.188 joerg .endif
304 1.187 christos .endif
305 1.158 plunky
306 1.178 mbalmer # Lua bindings come last, they might depend on anything
307 1.178 mbalmer SUBDIR+= lua
308 1.178 mbalmer
309 1.195 joerg .include <bsd.buildinstall.mk>
310 1.1 cgd .include <bsd.subdir.mk>
311