xref: /netbsd/lib/Makefile (revision 36ca602a)
1#	$NetBSD: Makefile,v 1.185 2012/07/12 19:11:06 christos Exp $
2#	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
3
4.include <bsd.own.mk>
5
6SUBDIR=		csu
7
8.if (${MKGCC} != "no")
9. if ${HAVE_GCC} == 4
10.  if (${USE_COMPILERCRTSTUFF} == "yes")
11SUBDIR+=	../gnu/lib/crtstuff4
12.  endif
13SUBDIR+=	../gnu/lib/libgcc4
14. else
15.  if (${USE_COMPILERCRTSTUFF} == "yes")
16SUBDIR+=	../external/gpl3/gcc/lib/crtstuff
17.  endif
18SUBDIR+=	../external/gpl3/gcc/lib/libgcc
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		librumpclient libtelnet libterminfo \
40		libusbhid libutil libwrap liby libz
41
42.if (${MKSKEY} != "no")
43SUBDIR+=	libskey
44.endif
45
46.if (${MKCRYPTO} != "no")
47SUBDIR+=	../crypto/external/bsd/netpgp/libmj
48.endif
49
50.if (${MKMDNS} != "no")
51SUBDIR+=	../external/apache2/mDNSResponder/lib
52.endif
53
54SUBDIR+=	../external/bsd/am-utils/lib
55
56SUBDIR+=	../external/bsd/flex/lib
57SUBDIR+=	../external/bsd/tre/lib
58SUBDIR+=	../external/bsd/libdwarf/lib
59SUBDIR+=	../external/bsd/libelf/lib
60SUBDIR+=	../external/bsd/libevent/lib
61SUBDIR+=	../external/bsd/liblzf/lib
62SUBDIR+=	../external/bsd/libpcap/lib
63
64SUBDIR+=	../external/mit/lua/lib
65SUBDIR+=	../external/mit/expat/lib
66
67SUBDIR+=	../external/public-domain/sqlite/lib
68SUBDIR+=	../external/public-domain/xz/lib
69
70SUBDIR+=	../gnu/lib/libmalloc
71
72.if (${MKGCC} != "no")
73. if ${HAVE_GCC} == 4
74SUBDIR+=	../gnu/lib/libobjc4
75. else
76SUBDIR+=	../external/gpl3/gcc/lib/libobjc
77SUBDIR+=	../external/gpl3/gcc/lib/libgomp
78. endif
79. if ${HAVE_GCC} >= 45 && !defined(MLIBDIR)
80# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
81# specific build area, but we get better parallelism this way.
82SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
83SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
84SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
85. endif
86.endif
87
88#
89# Libraries that depend upon any listed previously
90# (and those that depend upon these [and ...])
91#
92#==================== 1st library dependency barrier ====================
93SUBDIR+=	.WAIT
94
95SUBDIR+=	libcurses	# depends on libterminfo
96SUBDIR+=	libdm		# depends on libprop
97SUBDIR+=	libedit		# depends on libterminfo
98SUBDIR+=	libexecinfo 	# depends on libelf
99SUBDIR+=	libppath	# depends on libprop
100SUBDIR+=	libperfuse	# depends on libpuffs
101SUBDIR+=	libquota	# depends on libprop and librpcsvc
102SUBDIR+=	librefuse	# depends on libpuffs
103SUBDIR+=	librumpuser	# depends on libpthread
104SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
105
106.if (${MKNPF} != "no")
107SUBDIR+=	libnpf		# depends on libprop
108.endif
109
110.if (${MKCRYPTO} != "no")
111SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
112.endif
113
114SUBDIR+=	../external/bsd/file/lib	# depends on libz
115
116.if (${MKISCSI} != "no")
117SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
118.endif
119
120SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
121
122.if (${MKLVM} != "no")
123SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
124.endif
125
126.if (${MKBINUTILS} != "no")
127SUBDIR+=	../external/gpl3/binutils/lib	# libbfd depends on libz
128.endif
129
130.if (${MKGCC} != "no" && ${MKCXX} != "no")
131. if ${HAVE_GCC} == 4
132SUBDIR+=	../gnu/lib/libstdc++-v3_4	# depends on libm
133SUBDIR+=	../gnu/lib/libsupc++4
134. else
135SUBDIR+=	../external/gpl3/gcc/lib/libstdc++-v3
136SUBDIR+=	../external/gpl3/gcc/lib/libsupc++
137. endif
138.endif
139
140#==================== 2nd library dependency barrier ====================
141SUBDIR+=	.WAIT
142
143.if (${MKATF} != "no")
144SUBDIR+=	../external/bsd/atf/lib	# depends on libstdc++ and libm
145.endif
146
147SUBDIR+=	libform		# depends on libcurses
148SUBDIR+=	libmenu		# depends on libcurses
149SUBDIR+=	libradius	# depends on libcrypto if (${MKCRYPTO} != "no")
150SUBDIR+=	librump		# depends on librumpuser
151
152.if (${MKKERBEROS} != "no")
153SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
154							# libedit, libterminfo,
155.endif
156
157.if (${MKCRYPTO} != "no")
158SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
159SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
160.endif
161
162SUBDIR+=	../external/bsd/bind/lib	# depends on libcrypto
163SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
164
165.if (${MKLDAP} != "no")
166SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
167.endif
168
169#==================== 3rd library dependency barrier ====================
170SUBDIR+=	.WAIT
171
172SUBDIR+=	librumpdev	# depends on librump
173SUBDIR+=	librumpnet	# depends on librump
174SUBDIR+=	librumpvfs	# depends on librump
175
176.if (${MKPAM} != "no")
177SUBDIR+=	libpam		# depends on heimdal
178.endif
179
180.if (${MKCRYPTO} != "no")
181SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
182.endif
183
184SUBDIR+=	../external/bsd/mdocml/lib
185
186#==================== 4th library dependency barrier ====================
187SUBDIR+=	.WAIT
188
189SUBDIR+=	libukfs		# depends on librumpvfs, librump
190
191#==================== 5th library dependency barrier ====================
192SUBDIR+=	.WAIT
193
194SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
195
196# Lua bindings come last, they might depend on anything
197SUBDIR+=	lua
198
199.include <bsd.subdir.mk>
200