netbsd ping & traceroute
[minix3.git] / lib / Makefile
bloba5ec01b86d184aa9a2e7e4bebf5eefa19aed5d32
1 # $NetBSD: Makefile,v 1.209 2013/11/28 12:08:56 mrg 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 . if ${HAVE_GCC} == 4
10 . if (${USE_COMPILERCRTSTUFF} == "yes")
11 SUBDIR+= ../gnu/lib/crtstuff4 .WAIT
12 . endif
13 SUBDIR+= ../gnu/lib/libgcc4 .WAIT
14 . else
15 . if (${USE_COMPILERCRTSTUFF} == "yes")
16 SUBDIR+= ../external/gpl3/gcc/lib/crtstuff .WAIT
17 . endif
18 SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT
19 . endif
20 .endif
22 .if defined(__MINIX)
23 #LSC MINIX libc depends on
24 # - libminlib because of minix/lib/libc/malloc-debug.c
25 # - libmthread because of sys/lib/libunwind
26 SUBDIR+= ../minix/lib/libminlib
27 SUBDIR+= .WAIT
29 SUBDIR+= ../minix/lib/libsys
30 SUBDIR+= ../minix/lib/libmthread
31 SUBDIR+= .WAIT
32 .endif # defined(__MINIX)
33 SUBDIR+= libc
34 SUBDIR+= .WAIT
36 .if defined(__MINIX)
37 SUBDIR+= ../minix/lib/libasyn \
38 ../minix/lib/libaudiodriver \
39 ../minix/lib/libbdev \
40 ../minix/lib/libblockdriver \
41 ../minix/lib/libchardriver \
42 ../minix/lib/libcompat_minix \
43 ../minix/lib/libddekit \
44 ../minix/lib/libdevman \
45 ../minix/lib/libexec \
46 ../minix/lib/libfetch \
47 ../minix/lib/libinputdriver \
48 ../minix/lib/libminc \
49 ../minix/lib/libminixfs \
50 ../minix/lib/libnetdriver \
51 ../minix/lib/libsffs \
52 ../minix/lib/libtimers \
53 ../minix/lib/libusb \
54 ../minix/lib/libvtreefs
56 .if (${HAVE_LIBGCC} == "no")
57 SUBDIR+= ../minix/lib/libgcc_s_empty
58 .endif
60 .if (${MKLWIP} == "yes")
61 SUBDIR+= ../minix/lib/liblwip \
62 ../minix/lib/libnetsock
63 .endif
65 .if (${MACHINE_ARCH} == "i386")
66 SUBDIR+= ../minix/lib/libhgfs \
67 ../minix/lib/libvassert \
68 ../minix/lib/libvboxfs \
69 ../minix/lib/libvirtio
70 .endif
72 .if (${MACHINE_ARCH} == "earm")
73 SUBDIR+= ../minix/lib/libclkconf \
74 ../minix/lib/libgpio \
75 ../minix/lib/libi2cdriver
76 .endif
78 .endif # defined(__MINIX)
80 # The SUBDIRs above are included here for completeness but should be built
81 # and installed prior to make(dependall) in this file, as libraries listed
82 # below will depend on versions from DESTDIR only.
85 #SUBDIR+= i18n_module
87 SUBDIR+= \
88 libbz2 \
89 libcrypt \
90 libm \
91 libprop \
92 libpuffs librmt \
93 libterminfo \
94 libutil libz
96 .if !defined(BSD_MK_COMPAT_FILE)
97 #SUBDIR+= libkern
98 .endif
100 .if (${MACHINE_CPU} == "arm")
101 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
102 .if empty(LIBC_MACHINE_ARCH:M*hf*)
103 SUBDIR+= libc_vfp
104 .endif
105 .endif
106 .if (${MKRUMP} != "no")
107 SUBDIR+= librumpclient
108 .endif
109 .if (${MKSKEY} != "no")
110 SUBDIR+= libskey
111 .endif
113 .if (${MKMDNS} != "no")
114 SUBDIR+= ../external/apache2/mDNSResponder/lib
115 .endif
117 #SUBDIR+= ../external/bsd/am-utils/lib
119 SUBDIR+= ../external/bsd/flex/lib
120 #SUBDIR+= ../external/bsd/tre/lib
121 SUBDIR+= ../external/bsd/libelf/lib
122 #SUBDIR+= ../external/bsd/liblzf/lib
123 #SUBDIR+= ../external/bsd/libpcap/lib
125 #SUBDIR+= ../external/mit/expat/lib
127 SUBDIR+= ../external/public-domain/sqlite/lib
128 SUBDIR+= ../external/public-domain/xz/lib
130 #SUBDIR+= ../gnu/lib/libmalloc
132 .if (${MKGCC} != "no")
133 . if ${HAVE_GCC} == 4
134 #SUBDIR+= ../gnu/lib/libobjc4
135 . else
136 . if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
137 SUBDIR+= ../external/gpl3/gcc/lib/libobjc
138 SUBDIR+= ../external/gpl3/gcc/lib/libgomp
139 . endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
140 . endif
141 . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR)
142 . if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
143 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
144 # specific build area, but we get better parallelism this way.
145 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
146 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
147 SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
148 . endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
149 . endif
150 .endif
153 # Libraries that depend upon any listed previously
154 # (and those that depend upon these [and ...])
156 #==================== 1st library dependency barrier ====================
157 SUBDIR+= .WAIT
159 .if (${MKCRYPTO} != "no")
160 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
161 SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
162 .endif
164 #SUBDIR+= ../external/bsd/libdwarf/lib # depends on libelf
165 SUBDIR+= ../external/mit/lua/lib # depends on libm
166 SUBDIR+= libcurses # depends on libterminfo
167 #SUBDIR+= libdm # depends on libprop
168 SUBDIR+= libedit # depends on libterminfo
169 SUBDIR+= libexecinfo # depends on libelf
170 #SUBDIR+= libppath # depends on libprop
171 #SUBDIR+= libperfuse # depends on libpuffs
172 #SUBDIR+= libquota # depends on libprop and librpcsvc
173 SUBDIR+= librefuse # depends on libpuffs
174 #SUBDIR+= libisns # depends on libpthread
175 .if (${MKRUMP} != "no")
176 SUBDIR+= librumpuser # depends on libpthread
177 SUBDIR+= librumphijack # depends on librumpclient and libpthread
178 .endif
180 .if (${MKNPF} != "no")
181 SUBDIR+= libnpf # depends on libprop
182 .endif
184 .if (${MKCRYPTO} != "no")
185 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
186 .endif
188 SUBDIR+= ../external/bsd/file/lib # depends on libz
190 .if (${MKISCSI} != "no")
191 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
192 .endif
194 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
196 .if (${MKLVM} != "no")
197 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
198 .endif
200 .if (${MKBINUTILS} != "no")
201 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
202 .endif
204 .if (${MKLIBCXX} != "no")
205 SUBDIR+= ../external/bsd/libc++
206 .endif
208 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
209 . if ${HAVE_GCC} == 4
210 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
211 SUBDIR+= ../gnu/lib/libsupc++4
212 . else
213 SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
214 SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
215 . endif
216 .endif
218 #==================== 2nd library dependency barrier ====================
219 SUBDIR+= .WAIT
221 .if (${MKNPF} != "no")
222 SUBDIR+= npf # depends on libnpf
223 .endif
225 .if (${MKATF} != "no")
226 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
227 .endif
229 .if (${MKKYUA} != "no")
230 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
231 .endif
233 SUBDIR+= libform # depends on libcurses
234 SUBDIR+= libmenu # depends on libcurses
235 #SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
236 .if (${MKRUMP} != "no")
237 SUBDIR+= librump # depends on librumpuser
238 .endif
240 .if (${MKKERBEROS} != "no")
241 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
242 # libedit, libterminfo,
243 .endif
245 .if (${MKCRYPTO} != "no")
246 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
247 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
248 .endif
250 #SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
251 #SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
253 .if (${MKLDAP} != "no")
254 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
255 .endif
257 #==================== 3rd library dependency barrier ====================
258 SUBDIR+= .WAIT
260 #SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto
262 .if (${MKRUMP} != "no")
263 SUBDIR+= librumpdev # depends on librump
264 SUBDIR+= librumpnet # depends on librump
265 SUBDIR+= librumpvfs # depends on librump
266 .endif
268 .if (${MKPAM} != "no")
269 SUBDIR+= libpam # depends on heimdal
270 .endif
272 .if (${MKCRYPTO} != "no")
273 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
274 .endif
276 .if ${MKSLJIT} != "no"
277 SUBDIR+= ../external/bsd/sljit/lib
278 SUBDIR+= .WAIT
279 SUBDIR+= libbpfjit
280 .endif
282 SUBDIR+= ../external/bsd/mdocml/lib
284 .if (${MKRUMP} != "no")
285 #==================== 4th library dependency barrier ====================
286 SUBDIR+= .WAIT
288 SUBDIR+= libukfs # depends on librumpvfs, librump
290 .if (${MKTPM} != "no")
291 SUBDIR+= ../crypto/external/cpl/trousers/lib
292 .endif
294 #==================== 5th library dependency barrier ====================
295 SUBDIR+= .WAIT
297 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
299 .if (${MKTPM} != "no")
300 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
301 .endif
303 .if !defined(BSD_MK_COMPAT_FILE)
304 SUBDIR+= ../sys/rump/dev/lib
305 SUBDIR+= ../sys/rump/fs/lib
306 SUBDIR+= ../sys/rump/kern/lib
307 SUBDIR+= ../sys/rump/net/lib
308 .endif
309 .endif
311 # Lua bindings come last, they might depend on anything
312 SUBDIR+= lua
314 .include <bsd.buildinstall.mk>
315 .include <bsd.subdir.mk>