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