Makefile revision 1.201 1 # $NetBSD: Makefile,v 1.201 2013/04/27 08:43:19 matt 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 . 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
21
22 SUBDIR+= libc
23 SUBDIR+= .WAIT
24
25 #
26 # The SUBDIRs above are included here for completeness but should be built
27 # and installed prior to make(dependall) in this file, as libraries listed
28 # below will depend on versions from DESTDIR only.
29 #
30
31 SUBDIR+= i18n_module
32
33 SUBDIR+= libarch \
34 libbluetooth libbsdmalloc libbz2 \
35 libcompat libcrypt \
36 libintl libipsec libisns libkvm libm \
37 libossaudio libpci libpmc libposix libprop libpthread \
38 libpthread_dbg libpuffs libresolv librmt librpcsvc librt \
39 libtelnet libterminfo \
40 libusbhid libutil libwrap liby libz
41
42 .if (${MACHINE_CPU} == "arm")
43 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
44 .if empty(LIBC_MACHINE_ARCH:M*hf*)
45 SUBDIR+= libc_vfp
46 .endif
47 .endif
48 .if (${MKRUMP} != "no")
49 SUBDIR+= librumpclient
50 .endif
51 .if (${MKSKEY} != "no")
52 SUBDIR+= libskey
53 .endif
54
55 .if (${MKCRYPTO} != "no")
56 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
57 SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify
58 .endif
59
60 .if (${MKMDNS} != "no")
61 SUBDIR+= ../external/apache2/mDNSResponder/lib
62 .endif
63
64 SUBDIR+= ../external/bsd/am-utils/lib
65
66 SUBDIR+= ../external/bsd/flex/lib
67 SUBDIR+= ../external/bsd/tre/lib
68 SUBDIR+= ../external/bsd/libdwarf/lib
69 SUBDIR+= ../external/bsd/libelf/lib
70 SUBDIR+= ../external/bsd/liblzf/lib
71 SUBDIR+= ../external/bsd/libpcap/lib
72
73 SUBDIR+= ../external/mit/lua/lib
74 SUBDIR+= ../external/mit/expat/lib
75
76 SUBDIR+= ../external/public-domain/sqlite/lib
77 SUBDIR+= ../external/public-domain/xz/lib
78
79 SUBDIR+= ../gnu/lib/libmalloc
80
81 .if (${MKGCC} != "no")
82 . if ${HAVE_GCC} == 4
83 SUBDIR+= ../gnu/lib/libobjc4
84 . else
85 SUBDIR+= ../external/gpl3/gcc/lib/libobjc
86 SUBDIR+= ../external/gpl3/gcc/lib/libgomp
87 . endif
88 . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR)
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 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
92 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
93 SUBDIR+= ../external/lgpl2/mpc/lib/libmpc
94 . endif
95 .endif
96
97 #
98 # Libraries that depend upon any listed previously
99 # (and those that depend upon these [and ...])
100 #
101 #==================== 1st library dependency barrier ====================
102 SUBDIR+= .WAIT
103
104 SUBDIR+= libcurses # depends on libterminfo
105 SUBDIR+= libdm # depends on libprop
106 SUBDIR+= libedit # depends on libterminfo
107 SUBDIR+= libexecinfo # depends on libelf
108 SUBDIR+= libppath # depends on libprop
109 SUBDIR+= libperfuse # depends on libpuffs
110 SUBDIR+= libquota # depends on libprop and librpcsvc
111 SUBDIR+= librefuse # depends on libpuffs
112 .if (${MKRUMP} != "no")
113 SUBDIR+= librumpuser # depends on libpthread
114 SUBDIR+= librumphijack # depends on librumpclient and libpthread
115 .endif
116
117 .if (${MKNPF} != "no")
118 SUBDIR+= libnpf # depends on libprop
119 SUBDIR+= npf
120 .endif
121
122 .if (${MKCRYPTO} != "no")
123 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
124 .endif
125
126 SUBDIR+= ../external/bsd/file/lib # depends on libz
127
128 .if (${MKISCSI} != "no")
129 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
130 .endif
131
132 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
133
134 .if (${MKLVM} != "no")
135 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
136 .endif
137
138 .if (${MKBINUTILS} != "no")
139 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
140 .endif
141
142 .if (${MKGCC} != "no" && ${MKCXX} != "no")
143 . if ${HAVE_GCC} == 4
144 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
145 SUBDIR+= ../gnu/lib/libsupc++4
146 . else
147 SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
148 SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
149 . endif
150 .endif
151
152 #==================== 2nd library dependency barrier ====================
153 SUBDIR+= .WAIT
154
155 .if (${MKATF} != "no")
156 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
157 .endif
158
159 .if (${MKKYUA} != "no")
160 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
161 .endif
162
163 SUBDIR+= libform # depends on libcurses
164 SUBDIR+= libmenu # depends on libcurses
165 SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
166 .if (${MKRUMP} != "no")
167 SUBDIR+= librump # depends on librumpuser
168 .endif
169
170 .if (${MKKERBEROS} != "no")
171 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
172 # libedit, libterminfo,
173 .endif
174
175 .if (${MKCRYPTO} != "no")
176 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
177 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
178 .endif
179
180 SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
181 SUBDIR+= ../external/bsd/bind/lib # depends on libcrypto
182 SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
183
184 .if (${MKLDAP} != "no")
185 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
186 .endif
187
188 #==================== 3rd library dependency barrier ====================
189 SUBDIR+= .WAIT
190
191 .if (${MKRUMP} != "no")
192 SUBDIR+= librumpdev # depends on librump
193 SUBDIR+= librumpnet # depends on librump
194 SUBDIR+= librumpvfs # depends on librump
195 .endif
196
197 .if (${MKPAM} != "no")
198 SUBDIR+= libpam # depends on heimdal
199 .endif
200
201 .if (${MKCRYPTO} != "no")
202 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
203 .endif
204
205 .if ${MKSLJIT} != "no"
206 SUBDIR+= ../external/bsd/sljit/lib
207 SUBDIR+= .WAIT
208 SUBDIR+= libbpfjit
209 .endif
210
211 SUBDIR+= ../external/bsd/mdocml/lib
212
213 .if (${MKRUMP} != "no")
214 #==================== 4th library dependency barrier ====================
215 SUBDIR+= .WAIT
216
217 SUBDIR+= libukfs # depends on librumpvfs, librump
218
219 .if (${MKTPM} != "no")
220 SUBDIR+= ../crypto/external/cpl/trousers/lib
221 .endif
222
223 #==================== 5th library dependency barrier ====================
224 SUBDIR+= .WAIT
225
226 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
227
228 .if (${MKTPM} != "no")
229 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
230 .endif
231
232 .if !defined(BSD_MK_COMPAT_FILE)
233 SUBDIR+= ../sys/rump/dev/lib
234 SUBDIR+= ../sys/rump/fs/lib
235 SUBDIR+= ../sys/rump/kern/lib
236 SUBDIR+= ../sys/rump/net/lib
237 .endif
238 .endif
239
240 # Lua bindings come last, they might depend on anything
241 SUBDIR+= lua
242
243 .include <bsd.buildinstall.mk>
244 .include <bsd.subdir.mk>
245