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