Makefile revision 1.207 1 # $NetBSD: Makefile,v 1.207 2013/09/11 23:04:10 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 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 !defined(BSD_MK_COMPAT_FILE)
43 SUBDIR+= libkern
44 .endif
45
46 .if (${MACHINE_CPU} == "arm")
47 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
48 .if empty(LIBC_MACHINE_ARCH:M*hf*)
49 SUBDIR+= libc_vfp
50 .endif
51 .endif
52 .if (${MKRUMP} != "no")
53 SUBDIR+= librumpclient
54 .endif
55 .if (${MKSKEY} != "no")
56 SUBDIR+= libskey
57 .endif
58
59 .if (${MKCRYPTO} != "no")
60 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
61 SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify
62 .endif
63
64 .if (${MKMDNS} != "no")
65 SUBDIR+= ../external/apache2/mDNSResponder/lib
66 .endif
67
68 SUBDIR+= ../external/bsd/am-utils/lib
69
70 SUBDIR+= ../external/bsd/flex/lib
71 SUBDIR+= ../external/bsd/tre/lib
72 SUBDIR+= ../external/bsd/libelf/lib
73 SUBDIR+= ../external/bsd/liblzf/lib
74 SUBDIR+= ../external/bsd/libpcap/lib
75
76 SUBDIR+= ../external/mit/lua/lib
77 SUBDIR+= ../external/mit/expat/lib
78
79 SUBDIR+= ../external/public-domain/sqlite/lib
80 SUBDIR+= ../external/public-domain/xz/lib
81
82 SUBDIR+= ../gnu/lib/libmalloc
83
84 .if (${MKGCC} != "no")
85 . if ${HAVE_GCC} == 4
86 SUBDIR+= ../gnu/lib/libobjc4
87 . else
88 SUBDIR+= ../external/gpl3/gcc/lib/libobjc
89 SUBDIR+= ../external/gpl3/gcc/lib/libgomp
90 . endif
91 . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR)
92 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
93 # specific build area, but we get better parallelism this way.
94 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
95 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
96 SUBDIR+= ../external/lgpl2/mpc/lib/libmpc
97 . endif
98 .endif
99
100 #
101 # Libraries that depend upon any listed previously
102 # (and those that depend upon these [and ...])
103 #
104 #==================== 1st library dependency barrier ====================
105 SUBDIR+= .WAIT
106
107 SUBDIR+= ../external/bsd/libdwarf/lib # depends on libelf
108 SUBDIR+= libcurses # depends on libterminfo
109 SUBDIR+= libdm # depends on libprop
110 SUBDIR+= libedit # depends on libterminfo
111 SUBDIR+= libexecinfo # depends on libelf
112 SUBDIR+= libppath # depends on libprop
113 SUBDIR+= libperfuse # depends on libpuffs
114 SUBDIR+= libquota # depends on libprop and librpcsvc
115 SUBDIR+= librefuse # depends on libpuffs
116 SUBDIR+= libisns # depends on libpthread
117 .if (${MKRUMP} != "no")
118 SUBDIR+= librumpuser # depends on libpthread
119 SUBDIR+= librumphijack # depends on librumpclient and libpthread
120 .endif
121
122 .if (${MKNPF} != "no")
123 SUBDIR+= libnpf # depends on libprop
124 SUBDIR+= npf
125 .endif
126
127 .if (${MKCRYPTO} != "no")
128 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
129 .endif
130
131 SUBDIR+= ../external/bsd/file/lib # depends on libz
132
133 .if (${MKISCSI} != "no")
134 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
135 .endif
136
137 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
138
139 .if (${MKLVM} != "no")
140 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
141 .endif
142
143 .if (${MKBINUTILS} != "no")
144 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
145 .endif
146
147 .if (${MKLIBCXX} != "no")
148 SUBDIR+= ../external/bsd/libc++
149 .endif
150
151 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
152 . if ${HAVE_GCC} == 4
153 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
154 SUBDIR+= ../gnu/lib/libsupc++4
155 . else
156 SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
157 SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
158 . endif
159 .endif
160
161 #==================== 2nd library dependency barrier ====================
162 SUBDIR+= .WAIT
163
164 .if (${MKATF} != "no")
165 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
166 .endif
167
168 .if (${MKKYUA} != "no")
169 SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
170 .endif
171
172 SUBDIR+= libform # depends on libcurses
173 SUBDIR+= libmenu # depends on libcurses
174 SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
175 .if (${MKRUMP} != "no")
176 SUBDIR+= librump # depends on librumpuser
177 .endif
178
179 .if (${MKKERBEROS} != "no")
180 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
181 # libedit, libterminfo,
182 .endif
183
184 .if (${MKCRYPTO} != "no")
185 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
186 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
187 .endif
188
189 SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
190 SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
191
192 .if (${MKLDAP} != "no")
193 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
194 .endif
195
196 #==================== 3rd library dependency barrier ====================
197 SUBDIR+= .WAIT
198
199 SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto
200
201 .if (${MKRUMP} != "no")
202 SUBDIR+= librumpdev # depends on librump
203 SUBDIR+= librumpnet # depends on librump
204 SUBDIR+= librumpvfs # depends on librump
205 .endif
206
207 .if (${MKPAM} != "no")
208 SUBDIR+= libpam # depends on heimdal
209 .endif
210
211 .if (${MKCRYPTO} != "no")
212 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
213 .endif
214
215 .if ${MKSLJIT} != "no"
216 SUBDIR+= ../external/bsd/sljit/lib
217 SUBDIR+= .WAIT
218 SUBDIR+= libbpfjit
219 .endif
220
221 SUBDIR+= ../external/bsd/mdocml/lib
222
223 .if (${MKRUMP} != "no")
224 #==================== 4th library dependency barrier ====================
225 SUBDIR+= .WAIT
226
227 SUBDIR+= libukfs # depends on librumpvfs, librump
228
229 .if (${MKTPM} != "no")
230 SUBDIR+= ../crypto/external/cpl/trousers/lib
231 .endif
232
233 #==================== 5th library dependency barrier ====================
234 SUBDIR+= .WAIT
235
236 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
237
238 .if (${MKTPM} != "no")
239 SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
240 .endif
241
242 .if !defined(BSD_MK_COMPAT_FILE)
243 SUBDIR+= ../sys/rump/dev/lib
244 SUBDIR+= ../sys/rump/fs/lib
245 SUBDIR+= ../sys/rump/kern/lib
246 SUBDIR+= ../sys/rump/net/lib
247 .endif
248 .endif
249
250 # Lua bindings come last, they might depend on anything
251 SUBDIR+= lua
252
253 .include <bsd.buildinstall.mk>
254 .include <bsd.subdir.mk>
255