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