-
Notifications
You must be signed in to change notification settings - Fork 281
/
Copy pathMakefile
329 lines (260 loc) · 8.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# $NetBSD: Makefile,v 1.304 2025/01/11 01:23:56 mrg Exp $
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
.include <bsd.own.mk>
SUBDIR= csu .WAIT
.if (${MKGCC} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
.endif
SUBDIR+= libc
SUBDIR+= .WAIT
#
# The SUBDIRs above are included here for completeness but should be built
# and installed prior to make(dependall) in this file, as libraries listed
# below will depend on versions from DESTDIR only.
#
SUBDIR+= i18n_module
SUBDIR+= libarch \
libbluetooth libbsdmalloc libbz2 \
libcompat libcrypt \
libintl libipsec libkvm libm \
libossaudio libpci libposix libprop libpthread \
libpuffs libresolv librmt librpcsvc librt \
libtelnet libterminfo \
libusbhid libutil liby libz
.if !defined(BSD_MK_COMPAT_FILE)
SUBDIR+= libkern
.endif
.if (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc")
SUBDIR+= libc_aligned
.endif
.if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
LIBC_MACHINE_CPU?=${MACHINE_CPU}
.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
SUBDIR+= libc_vfp
.endif
.endif
.if ${MACHINE_MIPS64}
SUBDIR+= libc_fp
.endif
.if (${MKRUMP} != "no")
SUBDIR+= librumpclient
.endif
.if (${MKSKEY} != "no")
SUBDIR+= libskey
.endif
.if ${HAVE_NVMM:Uno} == "yes" && !defined(MLIBDIR)
SUBDIR+= libnvmm
.endif
.if (${MKARGON2} != "no")
SUBDIR+= ../external/apache2/argon2/lib/libargon2
.endif
.if (${MKMDNS} != "no")
SUBDIR+= ../external/apache2/mDNSResponder/lib
.endif
SUBDIR+= ../external/bsd/am-utils/lib
SUBDIR+= ../external/bsd/flex/lib
SUBDIR+= ../external/bsd/tre/lib
ELFTOOLCHAINLIB=../external/bsd/elftoolchain/lib/
.include "${ELFTOOLCHAINLIB}Makefile.subdir"
SUBDIR+= ../external/bsd/liblzf/lib
SUBDIR+= ../external/bsd/libpcap/lib
.if ${MKSLJIT} != "no"
SUBDIR+= ../external/bsd/sljit/lib
SUBDIR+= libbpfjit
.endif
SUBDIR+= ../external/bsd/libnv/lib
.if (${MKZFS} != "no")
SUBDIR+= ../external/cddl/osnet/lib/libavl
SUBDIR+= ../external/cddl/osnet/lib/libnvpair
SUBDIR+= ../external/cddl/osnet/lib/libumem
SUBDIR+= ../external/cddl/osnet/lib/libuutil
.endif
SUBDIR+= ../external/mit/expat/lib
SUBDIR+= ../external/gpl2/libmalloc
SUBDIR+= ../external/bsd/${EXTERNAL_JEMALLOC_SUBDIR}/lib
.if (${MKGCC} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
.endif
# GCC and GDB >= 13 require GMP.
# We don't build compat versions of these
.if !defined(MLIBDIR) && (${MKGCCCMDS} != "no" || ${MKGDB} != "no")
SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
.endif
#
# Libraries that depend upon any listed previously
# (and those that depend upon these [and ...])
#
#==================== 1st library dependency barrier ====================
SUBDIR+= .WAIT
.if ${MKDTRACE} != "no"
SUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil
.endif
.if ${MKCTF} != "no"
SUBDIR+= ../external/cddl/osnet/lib/libctf
.endif
SUBDIR+= ../external/public-domain/xz/lib # depends on libpthread
SUBDIR+= ../crypto/external/bsd/netpgp/libmj
SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
SUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread
SUBDIR+= ../external/mit/lua/lib # depends on libm
SUBDIR+= ../external/public-domain/sqlite/lib # depends on libm
SUBDIR+= libcurses # depends on libterminfo
SUBDIR+= libdm # depends on libprop
SUBDIR+= libedit # depends on libterminfo
SUBDIR+= libexecinfo # depends on libelf
SUBDIR+= libppath # depends on libprop
SUBDIR+= libperfuse # depends on libpuffs
SUBDIR+= libquota # depends on libprop and librpcsvc
SUBDIR+= librefuse # depends on libpuffs
SUBDIR+= libisns # depends on libpthread
.if (${MKRUMP} != "no")
SUBDIR+= librumphijack # depends on librumpclient and libpthread
SUBDIR+= librumpres # depends on librumpclient
SUBDIR+= librumpuser # depends on libpthread
.endif
.if (${MKNPF} != "no")
SUBDIR+= libnpf # depends on libnv
.endif
OSSL=../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/
.include "${.CURDIR}/${OSSL}Makefile.subdir" # depends on libcrypt
.if (${MKISCSI} != "no")
SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
.endif
.if (${MKZFS} != "no")
SUBDIR+= ../external/cddl/osnet/lib/libzfs_core
SUBDIR+= ../external/cddl/osnet/lib/libzpool
.endif
.if (${MKLVM} != "no")
SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
.endif
.if (${MKBINUTILS} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz
.endif
.if (${MKLIBCXX} != "no")
SUBDIR+= ../external/bsd/libc++
.endif
.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
.endif
.if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
SUBDIR+= ../external/apache2/llvm/include
.endif
SUBDIR+= ../external/mit/libcbor/lib
SUBDIR+= ../external/mit/libuv/lib
SUBDIR+= ../external/bsd/zstd/lib
#==================== 2nd library dependency barrier ====================
SUBDIR+= .WAIT
SUBDIR+= libwrap
.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
.if ${MKGCCCMDS} != "no"
.for sanitizer in asan lsan ubsan
.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
.endif
.endfor
.endif
.endif
.if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
SUBDIR+= ../external/apache2/llvm/librt
.endif
SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz, zstd
SUBDIR+= ../external/bsd/file/lib # depends on libz, libbz2, libxz, zstd
.if (${MKNPF} != "no")
SUBDIR+= npf # depends on libnpf
.endif
.if (${MKATF} != "no")
ATFLIB= ../external/bsd/atf/lib/
.include "${ATFLIB}Makefile.subdir" # depends on libstdc++
.endif
.if (${MKKYUA} != "no")
SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
.endif
SUBDIR+= libform # depends on libcurses
SUBDIR+= libmenu # depends on libcurses
SUBDIR+= libpanel # depends on libcurses
SUBDIR+= libradius # depends on libcrypto
.if (${MKRUMP} != "no")
SUBDIR+= librump # depends on librumpuser
.endif
.if (${MKKERBEROS} != "no")
# heimdal depends on libcrypto, libedit, libterminfo
HEIMDALLIB= ../crypto/external/bsd/heimdal/lib/
.include "${HEIMDALLIB}Makefile.subdir" # depends on libcrypto
# libedit, libterminfo,
.endif
SUBDIR+= ../external/bsd/libfido2/lib # depends on libcbor
NETPGPLIB= ../crypto/external/bsd/netpgp/lib/
.include "${NETPGPLIB}Makefile.subdir" # depends on libcrypto, ...
LIBEVENTLIB= ../external/bsd/libevent/lib/
.include "${LIBEVENTLIB}Makefile.subdir" # depends on libcrypto
.if ${MKDTRACE} != "no"
SUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf
.endif
SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
.if (${MKLDAP} != "no")
OPENLDAPLIB= ../external/bsd/openldap/lib/ # depends on libcrypto, ...
.include "${OPENLDAPLIB}Makefile.subdir"
.endif
.if (${MKZFS} != "no")
SUBDIR+= ../external/cddl/osnet/lib/libzfs
.endif
SUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto
#==================== 3rd library dependency barrier ====================
SUBDIR+= .WAIT
SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz,
# libfido2
SUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib
SUBDIR+= ../external/mpl/bind/lib # depends on heimdal, libcrypto
# libuv
.if ${MKUNBOUND} != "no"
SUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto
.endif
.if ${MKDTRACE} != "no"
SUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc
.endif
.if (${MKRUMP} != "no")
SUBDIR+= librumpdev # depends on librump
SUBDIR+= librumpnet # depends on librump
SUBDIR+= librumpvfs # depends on librump
.endif
SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
SUBDIR+= ../external/bsd/mdocml/lib
#==================== 4th library dependency barrier ====================
SUBDIR+= .WAIT
.if (${MKPAM} != "no")
SUBDIR+= libpam # depends on heimdal, libssh
.endif
.if (${MKRUMP} != "no")
SUBDIR+= libukfs # depends on librumpvfs, librump
.endif
.if (${MKTPM} != "no")
SUBDIR+= ../crypto/external/cpl/trousers/lib
.endif
#==================== 5th library dependency barrier ====================
SUBDIR+= .WAIT
.if (${MKPAM} != "no")
SUBDIR+= ../external/bsd/pam-u2f/lib # depends on libpam
.endif
.if (${MKRUMP} != "no")
SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
.endif
.if (${MKTPM} != "no")
SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
.endif
.if (${MKRUMP} != "no")
.if !defined(BSD_MK_COMPAT_FILE)
SUBDIR+= ../sys/rump/dev/lib
SUBDIR+= ../sys/rump/fs/lib
SUBDIR+= ../sys/rump/kern/lib
SUBDIR+= ../sys/rump/net/lib
.endif
.endif
# Lua bindings come last, they might depend on anything
SUBDIR+= lua
.include <bsd.buildinstall.mk>
.include <bsd.subdir.mk>