Makefile revision 1.227 1 # $NetBSD: Makefile,v 1.227 2015/09/17 02:00:33 christos Exp $
2 # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
3
4 .include <bsd.own.mk>
5
6 SUBDIR= csu .WAIT
7
8 .if (${MKGCC} != "no")
9 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
10 .endif
11
12 SUBDIR+= libc
13 SUBDIR+= .WAIT
14
15 #
16 # The SUBDIRs above are included here for completeness but should be built
17 # and installed prior to make(dependall) in this file, as libraries listed
18 # below will depend on versions from DESTDIR only.
19 #
20
21 SUBDIR+= i18n_module
22
23 SUBDIR+= libarch \
24 libbluetooth libbsdmalloc libbz2 \
25 libcompat libcrypt \
26 libintl libipsec libkvm libm \
27 libossaudio libpci libpmc libposix libprop libpthread \
28 libpthread_dbg libpuffs libresolv librmt librpcsvc librt \
29 libtelnet libterminfo \
30 libusbhid libutil libwrap liby libz
31
32 .if !defined(BSD_MK_COMPAT_FILE)
33 SUBDIR+= libkern
34 .endif
35
36 .if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
37 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
38 .if empty(LIBC_MACHINE_ARCH:M*hf*)
39 SUBDIR+= libc_vfp
40 .endif
41 .endif
42 .if (${MKRUMP} != "no")
43 SUBDIR+= librumpclient
44 .endif
45 .if (${MKSKEY} != "no")
46 SUBDIR+= libskey
47 .endif
48
49 .if (${MKMDNS} != "no")
50 SUBDIR+= ../external/apache2/mDNSResponder/lib
51 .endif
52
53 SUBDIR+= ../external/bsd/am-utils/lib
54 SUBDIR+= ../external/bsd/blacklist/lib
55
56 SUBDIR+= ../external/bsd/flex/lib
57 SUBDIR+= ../external/bsd/tre/lib
58 SUBDIR+= ../external/bsd/elftoolchain/lib/libelf
59 SUBDIR+= ../external/bsd/liblzf/lib
60 SUBDIR+= ../external/bsd/libpcap/lib
61
62 .if ${MKSLJIT} != "no"
63 SUBDIR+= ../external/bsd/sljit/lib
64 SUBDIR+= libbpfjit
65 .endif
66
67 .if ${MKDTRACE} != "no"
68 SUBDIR+= ../external/cddl/osnet/lib/libdtrace
69 .endif
70
71 .if (${MKZFS} != "no")
72 SUBDIR+= ../external/cddl/osnet/lib/libavl
73 SUBDIR+= ../external/cddl/osnet/lib/libnvpair
74 SUBDIR+= ../external/cddl/osnet/lib/libumem
75 SUBDIR+= ../external/cddl/osnet/lib/libuutil
76 .endif
77
78 SUBDIR+= ../external/mit/expat/lib
79
80 SUBDIR+= ../external/public-domain/sqlite/lib
81
82 SUBDIR+= ../gnu/lib/libmalloc
83
84 .if (${MKGCC} != "no")
85 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
86 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
87 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap
88 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth
89 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
90 # specific build area, but we get better parallelism this way.
91 # We don't build compat versions of these.
92 . if !defined(MLIBDIR)
93 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
94 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
95 SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
96 . endif
97 .endif
98
99 #
100 # Libraries that depend upon any listed previously
101 # (and those that depend upon these [and ...])
102 #
103 #==================== 1st library dependency barrier ====================
104 SUBDIR+= .WAIT
105
106 .if ${MKDTRACE} != "no" || ${MKCTF} != "no"
107 SUBDIR+= ../external/cddl/osnet/lib/libctf
108 .endif
109
110 SUBDIR+= ../external/public-domain/xz/lib # depends on libpthread
111
112 .if (${MKCRYPTO} != "no")
113 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
114 SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
115 .endif
116
117 SUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
118 SUBDIR+= ../external/mit/lua/lib # depends on libm
119 SUBDIR+= libcurses # depends on libterminfo
120 SUBDIR+= libdm # depends on libprop
121 SUBDIR+= libedit # depends on libterminfo
122 SUBDIR+= libexecinfo # depends on libelf
123 SUBDIR+= libppath # depends on libprop
124 SUBDIR+= libperfuse # depends on libpuffs
125 SUBDIR+= libquota # depends on libprop and librpcsvc
126 SUBDIR+= librefuse # depends on libpuffs
127 SUBDIR+= libisns # depends on libpthread
128 .if (${MKRUMP} != "no")
129 SUBDIR+= librumpuser # depends on libpthread
130 SUBDIR+= librumphijack # depends on librumpclient and libpthread
131 .endif
132
133 .if (${MKNPF} != "no")
134 SUBDIR+= libnpf # depends on libprop
135 .endif
136
137 .if (${MKCRYPTO} != "no")
138 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
139 .endif
140
141 SUBDIR+= ../external/bsd/file/lib # depends on libz
142
143 .if (${MKISCSI} != "no")
144 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
145 .endif
146
147 .if (${MKZFS} != "no")
148 SUBDIR+= ../external/cddl/osnet/lib/libzfs
149 SUBDIR+= ../external/cddl/osnet/lib/libzpool
150 .endif
151
152 .if (${MKLVM} != "no")
153 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
154 .endif
155
156 .if (${MKBINUTILS} != "no")
157 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
158 .endif
159
160 .if (${MKLIBCXX} != "no")
161 SUBDIR+= ../external/bsd/libc++
162 .endif
163
164 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
165 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
166 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
167 .endif
168
169 #==================== 2nd library dependency barrier ====================
170 SUBDIR+= .WAIT
171
172 SANITIZER_DIR=../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libasan
173 .if exists(${SANITIZER_DIR})
174 SUBDIR+= ${SANITIZER_DIR}
175 .endif
176
177 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
178
179 .if (${MKNPF} != "no")
180 SUBDIR+= npf # depends on libnpf
181 .endif
182
183 .if (${MKATF} != "no")
184 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
185 .endif
186
187 .if (${MKKYUA} != "no")
188 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
189 .endif
190
191 SUBDIR+= libform # depends on libcurses
192 SUBDIR+= libmenu # depends on libcurses
193 SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
194 .if (${MKRUMP} != "no")
195 SUBDIR+= librump # depends on librumpuser
196 .endif
197
198 .if (${MKKERBEROS} != "no")
199 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
200 # libedit, libterminfo,
201 .endif
202
203 .if (${MKCRYPTO} != "no")
204 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
205 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
206 .endif
207
208 SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
209 SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
210
211 .if (${MKLDAP} != "no")
212 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
213 .endif
214
215 #==================== 3rd library dependency barrier ====================
216 SUBDIR+= .WAIT
217
218 SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto
219
220 .if (${MKRUMP} != "no")
221 SUBDIR+= librumpdev # depends on librump
222 SUBDIR+= librumpnet # depends on librump
223 SUBDIR+= librumpvfs # depends on librump
224 .endif
225
226 .if (${MKPAM} != "no")
227 SUBDIR+= libpam # depends on heimdal
228 .endif
229
230 .if (${MKCRYPTO} != "no")
231 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
232 .endif
233
234 SUBDIR+= ../external/bsd/mdocml/lib
235
236 .if (${MKRUMP} != "no")
237 #==================== 4th library dependency barrier ====================
238 SUBDIR+= .WAIT
239
240 SUBDIR+= libukfs # depends on librumpvfs, librump
241
242 .if (${MKTPM} != "no")
243 SUBDIR+= ../crypto/external/cpl/trousers/lib
244 .endif
245
246 #==================== 5th library dependency barrier ====================
247 SUBDIR+= .WAIT
248
249 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
250
251 .if (${MKTPM} != "no")
252 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
253 .endif
254
255 .if !defined(BSD_MK_COMPAT_FILE)
256 SUBDIR+= ../sys/rump/dev/lib
257 SUBDIR+= ../sys/rump/fs/lib
258 SUBDIR+= ../sys/rump/kern/lib
259 SUBDIR+= ../sys/rump/net/lib
260 .endif
261 .endif
262
263 # Lua bindings come last, they might depend on anything
264 SUBDIR+= lua
265
266 # Needed by rump and rescue which are outside the smbfs tree
267 SUBDIR+= ../external/bsd/smbfs/lib
268
269 .include <bsd.buildinstall.mk>
270 .include <bsd.subdir.mk>
271