1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: releng/10.3/lib/Makefile 295131 2016-02-01 23:07:31Z jhb $
3
4.include <bsd.own.mk>
5
6# The SUBDIR_ORDERED list is a small set of libraries which are used by many
7# of the other libraries.  These are built first with a .WAIT between them
8# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9# naming just these few items.
10
11SUBDIR_ORDERED=	csu \
12	.WAIT \
13	libc \
14	libc_nonshared \
15	libcompiler_rt \
16	${_libcplusplus} \
17	${_libcxxrt} \
18	libelf \
19	msun
20
21# The main list; please keep these sorted alphabetically.
22
23SUBDIR=	${SUBDIR_ORDERED} \
24	.WAIT \
25	libalias \
26	libarchive \
27	${_libatm} \
28	libauditd \
29	libbegemot \
30	libblocksruntime \
31	${_libbluetooth} \
32	${_libbsnmp} \
33	libbsm \
34	libbz2 \
35	libcalendar \
36	libcam \
37	${_libcom_err} \
38	libcompat \
39	libcrypt \
40	libdevctl \
41	libdevinfo \
42	libdevstat \
43	libdpv \
44	libdwarf \
45	libedit \
46	${_libefi} \
47	libexecinfo \
48	libexpat \
49	libfetch \
50	libfigpar \
51	libgeom \
52	${_libgpib} \
53	${_libgssapi} \
54	${_librpcsec_gss} \
55	${_libiconv_modules} \
56	libipsec \
57	${_libipx} \
58	libjail \
59	libkiconv \
60	libkvm \
61	${_libldns} \
62	liblzma \
63	${_libmagic} \
64	libmandoc \
65	libmemstat \
66	libmd \
67	${_libmilter} \
68	${_libmp} \
69	libmt \
70	${_libnandfs} \
71	libnetbsd \
72	${_libnetgraph} \
73	${_libngatm} \
74	libnv \
75	libopie \
76	libpam \
77	libpcap \
78	${_libpmc} \
79	${_libproc} \
80	libprocstat \
81	${_libradius} \
82	librpcsvc \
83	librt \
84	${_librtld_db} \
85	libsbuf \
86	${_libsdp} \
87	${_libsm} \
88	libsmb \
89	${_libsmdb} \
90	${_libsmutil} \
91	libstand \
92	libstdbuf \
93	libstdthreads \
94	libtacplus \
95	${_libtelnet} \
96	${_libthr} \
97	libthread_db \
98	libucl \
99	libufs \
100	libugidfw \
101	libulog \
102	${_libunbound} \
103	${_libusbhid} \
104	${_libusb} \
105	libutil \
106	${_libvgl} \
107	${_libvmmapi} \
108	libwrap \
109	liby \
110	${_libypclnt} \
111	libyaml \
112	libz \
113	ncurses \
114	${_atf} \
115	${_clang} \
116	${_tests}
117
118# Inter-library dependencies.  When the makefile for a library contains LDADD
119# libraries, those libraries should be listed as build order dependencies here.
120
121SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
122SUBDIR_DEPEND_libatm= libmd
123SUBDIR_DEPEND_libauditdm= libbsm
124SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
125SUBDIR_DEPEND_libc++= libcxxrt
126SUBDIR_DEPEND_libc= libcompiler_rt
127SUBDIR_DEPEND_libcam= libsbuf
128SUBDIR_DEPEND_libdevstat= libkvm
129SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
130SUBDIR_DEPEND_libedit= ncurses
131SUBDIR_DEPEND_libg++= msun
132SUBDIR_DEPEND_libgeom= libexpat libsbuf
133SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
134SUBDIR_DEPEND_libmagic= libz
135SUBDIR_DEPEND_libmemstat= libkvm
136SUBDIR_DEPEND_libopie= libmd
137SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
138SUBDIR_DEPEND_libpjdlog= libutil
139SUBDIR_DEPEND_libprocstat= libkvm libutil
140SUBDIR_DEPEND_libradius= libmd
141SUBDIR_DEPEND_libsmb= libkiconv
142SUBDIR_DEPEND_libstdc++= msun
143SUBDIR_DEPEND_libtacplus= libmd
144SUBDIR_DEPEND_libulog= libmd
145SUBDIR_DEPEND_libunbound= ${_libldns}
146SUBDIR_DEPEND_liblzma= ${_libthr}
147
148# NB: keep these sorted by MK_* knobs
149
150.if ${MK_ATM} != "no"
151_libngatm=	libngatm
152.endif
153
154.if ${MK_BLUETOOTH} != "no"
155_libbluetooth=	libbluetooth
156_libsdp=	libsdp
157.endif
158
159.if ${MK_BSNMP} != "no"
160_libbsnmp=	libbsnmp
161.endif
162
163.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
164_clang=		clang
165.endif
166
167.if ${MK_FILE} != "no"
168_libmagic=	libmagic
169.endif
170
171.if ${MK_GPIB} != "no"
172_libgpib=	libgpib
173.endif
174
175.if ${MK_GSSAPI} != "no"
176_libgssapi=	libgssapi
177_librpcsec_gss=	librpcsec_gss
178.endif
179
180.if ${MK_ICONV} != "no"
181_libiconv_modules=	libiconv_modules
182.endif
183
184.if ${MK_KERBEROS_SUPPORT} != "no"
185_libcom_err= libcom_err
186.endif
187
188.if ${MK_IPX} != "no"
189_libipx=	libipx
190.endif
191
192.if ${MK_LDNS} != "no"
193_libldns=	libldns
194.endif
195
196.if ${MK_LIBCPLUSPLUS} != "no"
197_libcxxrt=	libcxxrt
198_libcplusplus=	libc++
199.endif
200
201.if ${MK_LIBTHR} != "no"
202_libthr=	libthr
203.endif
204
205.if ${MK_NAND} != "no"
206_libnandfs=	libnandfs
207.endif
208
209.if ${MK_NETGRAPH} != "no"
210_libnetgraph=	libnetgraph
211.endif
212
213.if ${MK_NIS} != "no"
214_libypclnt=	libypclnt
215.endif
216
217.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
218_libvgl=	libvgl
219_libproc=	libproc
220_librtld_db=	librtld_db
221.endif
222
223.if ${MACHINE_CPUARCH} == "amd64"
224.if ${MK_BHYVE} != "no"
225_libvmmapi=	libvmmapi
226.endif
227.endif
228
229.if ${MACHINE_CPUARCH} == "ia64"
230_libefi=	libefi
231.endif
232
233.if ${MACHINE_CPUARCH} == "mips"
234_libproc=	libproc
235_librtld_db=	librtld_db
236.endif
237
238.if ${MACHINE_CPUARCH} == "powerpc"
239_libproc=	libproc
240_librtld_db=	librtld_db
241.endif
242
243.if ${MK_OPENSSL} != "no"
244_libmp=		libmp
245.endif
246
247.if ${MK_PMC} != "no"
248_libpmc=	libpmc
249.endif
250
251.if ${MK_RADIUS_SUPPORT} != "no"
252_libradius=	libradius
253.endif
254
255.if ${MK_SENDMAIL} != "no"
256_libmilter=	libmilter
257_libsm=		libsm
258_libsmdb=	libsmdb
259_libsmutil=	libsmutil
260.endif
261
262.if ${MK_TELNET} != "no"
263_libtelnet=	libtelnet
264.endif
265
266.if ${MK_TESTS} != "no"
267_atf=		atf
268_tests=		tests
269.endif
270
271.if ${MK_UNBOUND} != "no"
272_libunbound=	libunbound
273.endif
274
275.if ${MK_USB} != "no"
276_libusbhid=	libusbhid
277_libusb=	libusb
278.endif
279
280.if !defined(LIBRARIES_ONLY)
281afterinstall:
282	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
283.endif
284
285.if !make(install)
286SUBDIR_PARALLEL=
287.endif
288
289.include <bsd.subdir.mk>
290