Makefile revision 1.202 1 # $NetBSD: Makefile,v 1.202 2013/04/27 23:02:22 joerg 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 (${MKLIBCXX} != "no")
143 SUBDIR+= ../external/bsd/libc++
144 .endif
145
146 .if (${MKGCC} != "no" && ${MKCXX} != "no")
147 . if ${HAVE_GCC} == 4
148 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
149 SUBDIR+= ../gnu/lib/libsupc++4
150 . else
151 SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
152 SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
153 . endif
154 .endif
155
156 #==================== 2nd library dependency barrier ====================
157 SUBDIR+= .WAIT
158
159 .if (${MKATF} != "no")
160 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
161 .endif
162
163 .if (${MKKYUA} != "no")
164 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
165 .endif
166
167 SUBDIR+= libform # depends on libcurses
168 SUBDIR+= libmenu # depends on libcurses
169 SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
170 .if (${MKRUMP} != "no")
171 SUBDIR+= librump # depends on librumpuser
172 .endif
173
174 .if (${MKKERBEROS} != "no")
175 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
176 # libedit, libterminfo,
177 .endif
178
179 .if (${MKCRYPTO} != "no")
180 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
181 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
182 .endif
183
184 SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
185 SUBDIR+= ../external/bsd/bind/lib # depends on libcrypto
186 SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
187
188 .if (${MKLDAP} != "no")
189 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
190 .endif
191
192 #==================== 3rd library dependency barrier ====================
193 SUBDIR+= .WAIT
194
195 .if (${MKRUMP} != "no")
196 SUBDIR+= librumpdev # depends on librump
197 SUBDIR+= librumpnet # depends on librump
198 SUBDIR+= librumpvfs # depends on librump
199 .endif
200
201 .if (${MKPAM} != "no")
202 SUBDIR+= libpam # depends on heimdal
203 .endif
204
205 .if (${MKCRYPTO} != "no")
206 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
207 .endif
208
209 .if ${MKSLJIT} != "no"
210 SUBDIR+= ../external/bsd/sljit/lib
211 SUBDIR+= .WAIT
212 SUBDIR+= libbpfjit
213 .endif
214
215 SUBDIR+= ../external/bsd/mdocml/lib
216
217 .if (${MKRUMP} != "no")
218 #==================== 4th library dependency barrier ====================
219 SUBDIR+= .WAIT
220
221 SUBDIR+= libukfs # depends on librumpvfs, librump
222
223 .if (${MKTPM} != "no")
224 SUBDIR+= ../crypto/external/cpl/trousers/lib
225 .endif
226
227 #==================== 5th library dependency barrier ====================
228 SUBDIR+= .WAIT
229
230 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
231
232 .if (${MKTPM} != "no")
233 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
234 .endif
235
236 .if !defined(BSD_MK_COMPAT_FILE)
237 SUBDIR+= ../sys/rump/dev/lib
238 SUBDIR+= ../sys/rump/fs/lib
239 SUBDIR+= ../sys/rump/kern/lib
240 SUBDIR+= ../sys/rump/net/lib
241 .endif
242 .endif
243
244 # Lua bindings come last, they might depend on anything
245 SUBDIR+= lua
246
247 .include <bsd.buildinstall.mk>
248 .include <bsd.subdir.mk>
249