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