patch(1) problems workaround
[minix3.git] / lib / Makefile
blobef93459b48a2667935ad2ad3366a55e311c21f42
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 #LSC MINIX libc depends on
23 # - libminlib because of minix/malloc-debug.c
24 # - libmthread because of sys/lib/libunwind
25 SUBDIR+= libminlib
26 SUBDIR+= .WAIT
28 SUBDIR+= libsys
29 SUBDIR+= libmthread
30 SUBDIR+= .WAIT
32 SUBDIR+= libc
33 SUBDIR+= .WAIT
35 .if defined(__MINIX)
36 SUBDIR+= libasyn \
37 libaudiodriver \
38 libbdev \
39 libblockdriver \
40 libchardriver \
41 libcompat_minix \
42 libddekit \
43 libdevman \
44 libexec \
45 libfetch \
46 libinputdriver \
47 libminc \
48 libminixfs \
49 libnetdriver \
50 libsffs \
51 libtimers \
52 libusb \
53 libvtreefs
55 .if (${MKLWIP} == "yes")
56 SUBDIR+= liblwip \
57 libnetsock
58 .endif
60 .if (${MACHINE_ARCH} == "i386")
61 SUBDIR+= libhgfs \
62 libvassert \
63 libvboxfs \
64 libvirtio
65 .endif
67 .if (${MACHINE_ARCH} == "earm")
68 SUBDIR+= libclkconf \
69 libgpio \
70 libi2cdriver
71 .endif
73 .endif # defined(__MINIX)
75 # The SUBDIRs above are included here for completeness but should be built
76 # and installed prior to make(dependall) in this file, as libraries listed
77 # below will depend on versions from DESTDIR only.
80 #SUBDIR+= i18n_module
82 SUBDIR+= \
83 libbz2 \
84 libcrypt \
85 libm \
86 libprop \
87 libpuffs librmt \
88 libterminfo \
89 libutil libz
91 .if !defined(BSD_MK_COMPAT_FILE)
92 #SUBDIR+= libkern
93 .endif
95 .if (${MACHINE_CPU} == "arm")
96 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
97 .if empty(LIBC_MACHINE_ARCH:M*hf*)
98 SUBDIR+= libc_vfp
99 .endif
100 .endif
101 .if (${MKRUMP} != "no")
102 SUBDIR+= librumpclient
103 .endif
104 .if (${MKSKEY} != "no")
105 SUBDIR+= libskey
106 .endif
108 .if (${MKMDNS} != "no")
109 SUBDIR+= ../external/apache2/mDNSResponder/lib
110 .endif
112 #SUBDIR+= ../external/bsd/am-utils/lib
114 SUBDIR+= ../external/bsd/flex/lib
115 #SUBDIR+= ../external/bsd/tre/lib
116 SUBDIR+= ../external/bsd/libelf/lib
117 #SUBDIR+= ../external/bsd/liblzf/lib
118 #SUBDIR+= ../external/bsd/libpcap/lib
120 #SUBDIR+= ../external/mit/expat/lib
122 SUBDIR+= ../external/public-domain/sqlite/lib
123 SUBDIR+= ../external/public-domain/xz/lib
125 #SUBDIR+= ../gnu/lib/libmalloc
127 .if (${MKGCC} != "no")
128 . if ${HAVE_GCC} == 4
129 #SUBDIR+= ../gnu/lib/libobjc4
130 . else
131 . if !defined(__MINIX) || ${MKGCCCMDS} == "yes"
132 SUBDIR+= ../external/gpl3/gcc/lib/libobjc
133 SUBDIR+= ../external/gpl3/gcc/lib/libgomp
134 . endif # !defined(__MINIX) || ${MKGCCCMDS} == "yes"
135 . endif
136 # LSC: Replaced __MINIX test with MKGCCCMDS, as we do not want gcc by default
137 # nor the libraries, but we still want to retain the possibility of
138 # installing GCC from the base system.
139 . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) && ${MKGCCCMDS} == "yes"
140 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
141 # specific build area, but we get better parallelism this way.
142 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
143 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
144 SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
145 . endif
146 .endif
149 # Libraries that depend upon any listed previously
150 # (and those that depend upon these [and ...])
152 #==================== 1st library dependency barrier ====================
153 SUBDIR+= .WAIT
155 .if (${MKCRYPTO} != "no")
156 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
157 SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
158 .endif
160 #SUBDIR+= ../external/bsd/libdwarf/lib # depends on libelf
161 SUBDIR+= ../external/mit/lua/lib # depends on libm
162 SUBDIR+= libcurses # depends on libterminfo
163 #SUBDIR+= libdm # depends on libprop
164 SUBDIR+= libedit # depends on libterminfo
165 SUBDIR+= libexecinfo # depends on libelf
166 #SUBDIR+= libppath # depends on libprop
167 #SUBDIR+= libperfuse # depends on libpuffs
168 #SUBDIR+= libquota # depends on libprop and librpcsvc
169 SUBDIR+= librefuse # depends on libpuffs
170 #SUBDIR+= libisns # depends on libpthread
171 .if (${MKRUMP} != "no")
172 SUBDIR+= librumpuser # depends on libpthread
173 SUBDIR+= librumphijack # depends on librumpclient and libpthread
174 .endif
176 .if (${MKNPF} != "no")
177 SUBDIR+= libnpf # depends on libprop
178 .endif
180 .if (${MKCRYPTO} != "no")
181 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
182 .endif
184 SUBDIR+= ../external/bsd/file/lib # depends on libz
186 .if (${MKISCSI} != "no")
187 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
188 .endif
190 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
192 .if (${MKLVM} != "no")
193 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
194 .endif
196 .if (${MKBINUTILS} != "no")
197 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
198 .endif
200 .if (${MKLIBCXX} != "no")
201 SUBDIR+= ../external/bsd/libc++
202 .endif
204 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
205 .if (defined(__MINIX) && ${MKGCCCMDS} == "yes")
206 . if ${HAVE_GCC} == 4
207 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
208 SUBDIR+= ../gnu/lib/libsupc++4
209 . else
210 SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
211 SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
212 . endif
213 .endif # (defined(__MINIX) && ${MKGCCCMDS} == "yes")
214 .endif
216 #==================== 2nd library dependency barrier ====================
217 SUBDIR+= .WAIT
219 .if (${MKNPF} != "no")
220 SUBDIR+= npf # depends on libnpf
221 .endif
223 .if (${MKATF} != "no")
224 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
225 .endif
227 .if (${MKKYUA} != "no")
228 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
229 .endif
231 SUBDIR+= libform # depends on libcurses
232 SUBDIR+= libmenu # depends on libcurses
233 #SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
234 .if (${MKRUMP} != "no")
235 SUBDIR+= librump # depends on librumpuser
236 .endif
238 .if (${MKKERBEROS} != "no")
239 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
240 # libedit, libterminfo,
241 .endif
243 .if (${MKCRYPTO} != "no")
244 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
245 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
246 .endif
248 #SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
249 #SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
251 .if (${MKLDAP} != "no")
252 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
253 .endif
255 #==================== 3rd library dependency barrier ====================
256 SUBDIR+= .WAIT
258 #SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto
260 .if (${MKRUMP} != "no")
261 SUBDIR+= librumpdev # depends on librump
262 SUBDIR+= librumpnet # depends on librump
263 SUBDIR+= librumpvfs # depends on librump
264 .endif
266 .if (${MKPAM} != "no")
267 SUBDIR+= libpam # depends on heimdal
268 .endif
270 .if (${MKCRYPTO} != "no")
271 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
272 .endif
274 .if ${MKSLJIT} != "no"
275 SUBDIR+= ../external/bsd/sljit/lib
276 SUBDIR+= .WAIT
277 SUBDIR+= libbpfjit
278 .endif
280 SUBDIR+= ../external/bsd/mdocml/lib
282 .if (${MKRUMP} != "no")
283 #==================== 4th library dependency barrier ====================
284 SUBDIR+= .WAIT
286 SUBDIR+= libukfs # depends on librumpvfs, librump
288 .if (${MKTPM} != "no")
289 SUBDIR+= ../crypto/external/cpl/trousers/lib
290 .endif
292 #==================== 5th library dependency barrier ====================
293 SUBDIR+= .WAIT
295 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
297 .if (${MKTPM} != "no")
298 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
299 .endif
301 .if !defined(BSD_MK_COMPAT_FILE)
302 SUBDIR+= ../sys/rump/dev/lib
303 SUBDIR+= ../sys/rump/fs/lib
304 SUBDIR+= ../sys/rump/kern/lib
305 SUBDIR+= ../sys/rump/net/lib
306 .endif
307 .endif
309 # Lua bindings come last, they might depend on anything
310 SUBDIR+= lua
312 .include <bsd.buildinstall.mk>
313 .include <bsd.subdir.mk>