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