xref: /minix/lib/Makefile (revision e3b78ef1)
1#	$NetBSD: Makefile,v 1.209 2013/11/28 12:08:56 mrg 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
22.if defined(__MINIX)
23#LSC MINIX libc depends on
24# - libmthread because of sys/lib/libunwind
25SUBDIR+=	.WAIT
26
27SUBDIR+=	../minix/lib/libsys
28SUBDIR+=	../minix/lib/libmthread
29SUBDIR+=	.WAIT
30.endif # defined(__MINIX)
31SUBDIR+=	libc
32SUBDIR+=	.WAIT
33
34.if defined(__MINIX)
35SUBDIR+=	../minix/lib/libasyn \
36		../minix/lib/libaudiodriver \
37		../minix/lib/libbdev \
38		../minix/lib/libblockdriver \
39		../minix/lib/libchardriver \
40		../minix/lib/libddekit \
41		../minix/lib/libdevman \
42		../minix/lib/libexec \
43		../minix/lib/libfetch \
44		../minix/lib/libfsdriver \
45		../minix/lib/libinputdriver \
46		../minix/lib/libminc \
47		../minix/lib/libminixfs \
48		../minix/lib/libnetdriver \
49		../minix/lib/libsffs \
50		../minix/lib/libtimers \
51		../minix/lib/libusb \
52		../minix/lib/libvtreefs
53
54.if (${HAVE_LIBGCC} == "no")
55SUBDIR+=	../minix/lib/libgcc_s_empty
56.endif
57
58.if (${MKLWIP} == "yes")
59SUBDIR+=	../minix/lib/liblwip \
60		../minix/lib/libnetsock
61.endif
62
63.if (${MACHINE_ARCH} == "i386")
64SUBDIR+=	../minix/lib/libhgfs \
65		../minix/lib/libvassert \
66		../minix/lib/libvboxfs \
67		../minix/lib/libvirtio
68.endif
69
70.if (${MACHINE_ARCH} == "earm")
71SUBDIR+=	../minix/lib/libclkconf \
72		../minix/lib/libgpio \
73		../minix/lib/libi2cdriver
74.endif
75
76.endif # defined(__MINIX)
77#
78# The SUBDIRs above are included here for completeness but should be built
79# and installed prior to make(dependall) in this file, as libraries listed
80# below will depend on versions from DESTDIR only.
81#
82
83#SUBDIR+=	i18n_module
84
85SUBDIR+=	\
86		libbz2 \
87		libcrypt \
88		libm \
89		libpci libprop \
90		libpuffs librmt \
91		libterminfo \
92		libutil libz
93
94.if !defined(BSD_MK_COMPAT_FILE)
95#SUBDIR+=	libkern
96.endif
97
98.if (${MACHINE_CPU} == "arm")
99LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
100.if empty(LIBC_MACHINE_ARCH:M*hf*)
101.if !defined(__MINIX)
102SUBDIR+=	libc_vfp
103.endif
104.endif
105.endif
106.if (${MKRUMP} != "no")
107SUBDIR+=	librumpclient
108.endif
109.if (${MKSKEY} != "no")
110SUBDIR+=	libskey
111.endif
112
113.if (${MKMDNS} != "no")
114SUBDIR+=	../external/apache2/mDNSResponder/lib
115.endif
116
117#SUBDIR+=	../external/bsd/am-utils/lib
118
119SUBDIR+=	../external/bsd/flex/lib
120#SUBDIR+=	../external/bsd/tre/lib
121SUBDIR+=	../external/bsd/libelf/lib
122#SUBDIR+=	../external/bsd/liblzf/lib
123#SUBDIR+=	../external/bsd/libpcap/lib
124
125SUBDIR+=	../external/mit/expat/lib
126
127SUBDIR+=	../external/public-domain/sqlite/lib
128SUBDIR+=	../external/public-domain/xz/lib
129
130#SUBDIR+=	../gnu/lib/libmalloc
131
132.if (${MKGCC} != "no")
133. if ${HAVE_GCC} == 4
134#SUBDIR+=	../gnu/lib/libobjc4
135. else
136.   if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
137SUBDIR+=	../external/gpl3/gcc/lib/libobjc
138SUBDIR+=	../external/gpl3/gcc/lib/libgomp
139.   endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
140. endif
141. if ${HAVE_GCC} >= 45 && !defined(MLIBDIR)
142.   if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
143# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
144# specific build area, but we get better parallelism this way.
145SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
146SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
147SUBDIR+=	../external/lgpl3/mpc/lib/libmpc
148.   endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes"
149. endif
150.endif
151
152#
153# Libraries that depend upon any listed previously
154# (and those that depend upon these [and ...])
155#
156#==================== 1st library dependency barrier ====================
157SUBDIR+=	.WAIT
158
159.if (${MKCRYPTO} != "no")
160SUBDIR+=	../crypto/external/bsd/netpgp/libmj
161SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
162.endif
163
164#SUBDIR+=	../external/bsd/libdwarf/lib # depends on libelf
165SUBDIR+=	../external/mit/lua/lib # depends on libm
166SUBDIR+=	libcurses	# depends on libterminfo
167#SUBDIR+=	libdm		# depends on libprop
168SUBDIR+=	libedit		# depends on libterminfo
169SUBDIR+=	libexecinfo 	# depends on libelf
170#SUBDIR+=	libppath	# depends on libprop
171#SUBDIR+=	libperfuse	# depends on libpuffs
172#SUBDIR+=	libquota	# depends on libprop and librpcsvc
173SUBDIR+=	librefuse	# depends on libpuffs
174#SUBDIR+=	libisns 	# depends on libpthread
175.if (${MKRUMP} != "no")
176SUBDIR+=	librumpuser	# depends on libpthread
177SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
178.endif
179
180.if (${MKNPF} != "no")
181SUBDIR+=	libnpf		# depends on libprop
182.endif
183
184.if (${MKCRYPTO} != "no")
185SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
186.endif
187
188SUBDIR+=	../external/bsd/file/lib	# depends on libz
189
190.if (${MKISCSI} != "no")
191SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
192.endif
193
194SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
195
196.if (${MKLVM} != "no")
197SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
198.endif
199
200.if (${MKBINUTILS} != "no")
201SUBDIR+=	../external/gpl3/binutils/lib	# libbfd depends on libz
202.endif
203
204.if (${MKLIBCXX} != "no")
205SUBDIR+=	../external/bsd/libc++
206.endif
207
208.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
209. if ${HAVE_GCC} == 4
210SUBDIR+=	../gnu/lib/libstdc++-v3_4	# depends on libm
211SUBDIR+=	../gnu/lib/libsupc++4
212. else
213SUBDIR+=	../external/gpl3/gcc/lib/libstdc++-v3
214SUBDIR+=	../external/gpl3/gcc/lib/libsupc++
215. endif
216.endif
217
218#==================== 2nd library dependency barrier ====================
219SUBDIR+=	.WAIT
220
221.if (${MKNPF} != "no")
222SUBDIR+=	npf		# depends on libnpf
223.endif
224
225.if (${MKATF} != "no")
226SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
227.endif
228
229.if (${MKKYUA} != "no")
230SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
231.endif
232
233SUBDIR+=	libform		# depends on libcurses
234SUBDIR+=	libmenu		# depends on libcurses
235#SUBDIR+=	libradius	# depends on libcrypto if (${MKCRYPTO} != "no")
236.if (${MKRUMP} != "no")
237SUBDIR+=	librump		# depends on librumpuser
238.endif
239
240.if (${MKKERBEROS} != "no")
241SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
242							# libedit, libterminfo,
243.endif
244
245.if (${MKCRYPTO} != "no")
246SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
247SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
248.endif
249
250SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
251#SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
252
253.if (${MKLDAP} != "no")
254SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
255.endif
256
257#==================== 3rd library dependency barrier ====================
258SUBDIR+=	.WAIT
259
260#SUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
261
262.if (${MKRUMP} != "no")
263SUBDIR+=	librumpdev	# depends on librump
264SUBDIR+=	librumpnet	# depends on librump
265SUBDIR+=	librumpvfs	# depends on librump
266.endif
267
268.if (${MKPAM} != "no")
269SUBDIR+=	libpam		# depends on heimdal
270.endif
271
272.if (${MKCRYPTO} != "no")
273SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
274.endif
275
276.if ${MKSLJIT} != "no"
277SUBDIR+=	../external/bsd/sljit/lib
278SUBDIR+=	.WAIT
279SUBDIR+=	libbpfjit
280.endif
281
282SUBDIR+=	../external/bsd/mdocml/lib
283
284.if (${MKRUMP} != "no")
285#==================== 4th library dependency barrier ====================
286SUBDIR+=	.WAIT
287
288SUBDIR+=	libukfs		# depends on librumpvfs, librump
289
290.if (${MKTPM} != "no")
291SUBDIR+=	../crypto/external/cpl/trousers/lib
292.endif
293
294#==================== 5th library dependency barrier ====================
295SUBDIR+=	.WAIT
296
297SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
298
299.if (${MKTPM} != "no")
300SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
301.endif
302
303.if !defined(BSD_MK_COMPAT_FILE)
304SUBDIR+=	../sys/rump/dev/lib
305SUBDIR+=	../sys/rump/fs/lib
306SUBDIR+=	../sys/rump/kern/lib
307SUBDIR+=	../sys/rump/net/lib
308.endif
309.endif
310
311# Lua bindings come last, they might depend on anything
312SUBDIR+=	lua
313
314.include <bsd.buildinstall.mk>
315.include <bsd.subdir.mk>
316