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