trace(1): resolve all level-5 LLVM warnings
[minix3.git] / lib / Makefile
blob0987a8f4f6cb46061ceab75a60bf0adc93596c95
1 # $NetBSD: Makefile,v 1.235 2015/09/28 17:12:12 christos Exp $
2 # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
4 .include <bsd.own.mk>
6 SUBDIR= csu .WAIT
8 .if (${MKGCC} != "no")
9 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
10 .endif
12 .if defined(__MINIX)
13 #LSC MINIX libc depends on
14 # - libmthread because of sys/lib/libunwind
15 SUBDIR+= .WAIT
17 SUBDIR+= ../minix/lib/libsys
18 SUBDIR+= ../minix/lib/libmthread
19 SUBDIR+= .WAIT
20 .endif # defined(__MINIX)
21 SUBDIR+= libc
22 SUBDIR+= .WAIT
24 .if defined(__MINIX)
25 SUBDIR+= ../minix/lib/libasyn \
26 ../minix/lib/libaudiodriver \
27 ../minix/lib/libbdev \
28 ../minix/lib/libblockdriver \
29 ../minix/lib/libchardriver \
30 ../minix/lib/libddekit \
31 ../minix/lib/libdevman \
32 ../minix/lib/libexec \
33 ../minix/lib/libfsdriver \
34 ../minix/lib/libinputdriver \
35 ../minix/lib/libminc \
36 ../minix/lib/libminixfs \
37 ../minix/lib/libnetdriver \
38 ../minix/lib/libsffs \
39 ../minix/lib/libtimers \
40 ../minix/lib/libusb \
41 ../minix/lib/libvtreefs
43 .if (${HAVE_LIBGCC} == "no")
44 SUBDIR+= ../minix/lib/libgcc_s_empty
45 .endif
47 .if (${MKLWIP} == "yes")
48 SUBDIR+= ../minix/lib/liblwip \
49 ../minix/lib/libnetsock
50 .endif
52 .if (${MACHINE_ARCH} == "i386")
53 SUBDIR+= ../minix/lib/libhgfs \
54 ../minix/lib/libvassert \
55 ../minix/lib/libvboxfs \
56 ../minix/lib/libvirtio
57 .endif
59 .if (${MACHINE_ARCH} == "earm")
60 SUBDIR+= ../minix/lib/libclkconf \
61 ../minix/lib/libgpio \
62 ../minix/lib/libi2cdriver
63 .endif
65 .if (${MKMAGIC} == "yes")
66 SUBDIR+= ../minix/lib/libmagicrt
67 .endif
69 .endif # defined(__MINIX)
71 # The SUBDIRs above are included here for completeness but should be built
72 # and installed prior to make(dependall) in this file, as libraries listed
73 # below will depend on versions from DESTDIR only.
76 #SUBDIR+= i18n_module
78 SUBDIR+= \
79 libbz2 \
80 libcrypt \
81 libkvm libm \
82 libpci libprop \
83 libpuffs librmt \
84 libterminfo \
85 libutil libz
87 .if !defined(BSD_MK_COMPAT_FILE)
88 #SUBDIR+= libkern
89 .endif
91 .if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
92 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
93 LIBC_MACHINE_CPU?=${MACHINE_CPU}
94 .if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
95 .if !defined(__MINIX)
96 SUBDIR+= libc_vfp
97 .endif # !defined(__MINIX)
98 .endif
99 .endif
100 .if (${MKRUMP} != "no")
101 SUBDIR+= librumpclient
102 .endif
103 .if (${MKSKEY} != "no")
104 SUBDIR+= libskey
105 .endif
107 .if (${MKMDNS} != "no")
108 SUBDIR+= ../external/apache2/mDNSResponder/lib
109 .endif
111 #SUBDIR+= ../external/bsd/am-utils/lib
112 SUBDIR+= ../external/bsd/blacklist/lib
114 SUBDIR+= ../external/bsd/flex/lib
115 #SUBDIR+= ../external/bsd/tre/lib
116 SUBDIR+= ../external/bsd/elftoolchain/lib/libelf
117 #SUBDIR+= ../external/bsd/liblzf/lib
118 #SUBDIR+= ../external/bsd/libpcap/lib
120 .if ${MKSLJIT} != "no"
121 SUBDIR+= ../external/bsd/sljit/lib
122 SUBDIR+= libbpfjit
123 .endif
125 .if (${MKZFS} != "no")
126 SUBDIR+= ../external/cddl/osnet/lib/libavl
127 SUBDIR+= ../external/cddl/osnet/lib/libnvpair
128 SUBDIR+= ../external/cddl/osnet/lib/libumem
129 SUBDIR+= ../external/cddl/osnet/lib/libuutil
130 .endif
132 SUBDIR+= ../external/mit/expat/lib
134 SUBDIR+= ../external/public-domain/sqlite/lib
136 #SUBDIR+= ../gnu/lib/libmalloc
138 .if (${MKGCC} != "no")
139 . if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
140 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
141 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
142 #SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap
143 #SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth
144 . endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
145 . if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
146 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
147 # specific build area, but we get better parallelism this way.
148 # We don't build compat versions of these.
149 . if !defined(MLIBDIR)
150 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
151 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
152 SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
153 . endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
154 . endif
155 .endif
158 # Libraries that depend upon any listed previously
159 # (and those that depend upon these [and ...])
161 #==================== 1st library dependency barrier ====================
162 SUBDIR+= .WAIT
164 .if ${MKDTRACE} != "no"
165 SUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil
166 .endif
168 .if ${MKDTRACE} != "no" || ${MKCTF} != "no"
169 SUBDIR+= ../external/cddl/osnet/lib/libctf
170 .endif
172 SUBDIR+= ../external/public-domain/xz/lib # depends on libpthread
174 .if (${MKCRYPTO} != "no")
175 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
176 SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
177 .endif
179 #SUBDIR+= ../external/bsd/libdwarf/lib # depends on libelf
180 SUBDIR+= ../external/mit/lua/lib # depends on libm
181 SUBDIR+= libcurses # depends on libterminfo
182 #SUBDIR+= libdm # depends on libprop
183 SUBDIR+= libedit # depends on libterminfo
184 SUBDIR+= libexecinfo # depends on libelf
185 #SUBDIR+= libppath # depends on libprop
186 #SUBDIR+= libperfuse # depends on libpuffs
187 #SUBDIR+= libquota # depends on libprop and librpcsvc
188 SUBDIR+= librefuse # depends on libpuffs
189 #SUBDIR+= libisns # depends on libpthread
190 .if (${MKRUMP} != "no")
191 SUBDIR+= librumpuser # depends on libpthread
192 SUBDIR+= librumphijack # depends on librumpclient and libpthread
193 .endif
195 .if (${MKNPF} != "no")
196 SUBDIR+= libnpf # depends on libprop
197 .endif
199 .if (${MKCRYPTO} != "no")
200 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
201 .endif
203 SUBDIR+= ../external/bsd/file/lib # depends on libz
205 .if (${MKISCSI} != "no")
206 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
207 .endif
209 .if (${MKZFS} != "no")
210 SUBDIR+= ../external/cddl/osnet/lib/libzfs
211 SUBDIR+= ../external/cddl/osnet/lib/libzpool
212 .endif
214 .if (${MKLVM} != "no")
215 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
216 .endif
218 .if (${MKBINUTILS} != "no")
219 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
220 .endif
222 .if (${MKLIBCXX} != "no")
223 SUBDIR+= ../external/bsd/libc++
224 .endif
226 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
227 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
228 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
229 .endif
231 #==================== 2nd library dependency barrier ====================
232 SUBDIR+= .WAIT
234 SANITIZER_DIR=../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libasan
235 .if exists(${SANITIZER_DIR})
236 #SUBDIR+= ${SANITIZER_DIR}
237 .endif
239 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
241 .if (${MKNPF} != "no")
242 SUBDIR+= npf # depends on libnpf
243 .endif
245 .if (${MKATF} != "no")
246 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
247 .endif
249 .if (${MKKYUA} != "no")
250 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
251 .endif
253 SUBDIR+= libform # depends on libcurses
254 SUBDIR+= libmenu # depends on libcurses
255 #SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
256 .if (${MKRUMP} != "no")
257 SUBDIR+= librump # depends on librumpuser
258 .endif
260 .if (${MKKERBEROS} != "no")
261 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
262 # libedit, libterminfo,
263 .endif
265 .if (${MKCRYPTO} != "no")
266 #SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
267 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
268 .endif
270 SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
271 .if ${MKDTRACE} != "no"
272 SUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf
273 .endif
274 SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
276 .if (${MKLDAP} != "no")
277 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
278 .endif
280 #==================== 3rd library dependency barrier ====================
281 SUBDIR+= .WAIT
283 #SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto
285 .if ${MKDTRACE} != "no"
286 SUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc
287 .endif
289 .if (${MKRUMP} != "no")
290 SUBDIR+= librumpdev # depends on librump
291 SUBDIR+= librumpnet # depends on librump
292 SUBDIR+= librumpvfs # depends on librump
293 .endif
295 .if (${MKPAM} != "no")
296 SUBDIR+= libpam # depends on heimdal
297 .endif
299 .if (${MKCRYPTO} != "no")
300 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
301 .endif
303 SUBDIR+= ../external/bsd/mdocml/lib
305 .if (${MKRUMP} != "no")
306 #==================== 4th library dependency barrier ====================
307 SUBDIR+= .WAIT
309 SUBDIR+= libukfs # depends on librumpvfs, librump
311 .if (${MKTPM} != "no")
312 SUBDIR+= ../crypto/external/cpl/trousers/lib
313 .endif
315 #==================== 5th library dependency barrier ====================
316 SUBDIR+= .WAIT
318 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
320 .if (${MKTPM} != "no")
321 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
322 .endif
324 .if !defined(BSD_MK_COMPAT_FILE)
325 SUBDIR+= ../sys/rump/dev/lib
326 SUBDIR+= ../sys/rump/fs/lib
327 SUBDIR+= ../sys/rump/kern/lib
328 SUBDIR+= ../sys/rump/net/lib
329 .endif
330 .endif
332 # Lua bindings come last, they might depend on anything
333 SUBDIR+= lua
335 # Needed by rump and rescue which are outside the smbfs tree
336 #SUBDIR+= ../external/bsd/smbfs/lib
338 .include <bsd.buildinstall.mk>
339 .include <bsd.subdir.mk>