1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: stable/10/lib/Makefile 322094 2017-08-05 12:33:00Z marius $
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_librpcsec_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_DIALOG} != "no"
168_libdpv=	libdpv
169.endif
170
171.if ${MK_FILE} != "no"
172_libmagic=	libmagic
173.endif
174
175.if ${MK_GPIB} != "no"
176_libgpib=	libgpib
177.endif
178
179.if ${MK_GSSAPI} != "no"
180_libgssapi=	libgssapi
181_librpcsec_gss=	librpcsec_gss
182.endif
183
184.if ${MK_ICONV} != "no"
185_libiconv_modules=	libiconv_modules
186.endif
187
188.if ${MK_KERBEROS_SUPPORT} != "no"
189_libcom_err= libcom_err
190.endif
191
192.if ${MK_IPX} != "no"
193_libipx=	libipx
194.endif
195
196.if ${MK_LDNS} != "no"
197_libldns=	libldns
198.endif
199
200.if ${MK_LIBCPLUSPLUS} != "no"
201_libcxxrt=	libcxxrt
202_libcplusplus=	libc++
203.endif
204
205.if ${MK_LIBTHR} != "no"
206_libthr=	libthr
207.endif
208
209.if ${MK_NAND} != "no"
210_libnandfs=	libnandfs
211.endif
212
213.if ${MK_NETGRAPH} != "no"
214_libnetgraph=	libnetgraph
215.endif
216
217.if ${MK_NIS} != "no"
218_libypclnt=	libypclnt
219.endif
220
221.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
222_libvgl=	libvgl
223_libproc=	libproc
224_librtld_db=	librtld_db
225.endif
226
227.if ${MACHINE_CPUARCH} == "amd64"
228.if ${MK_BHYVE} != "no"
229_libvmmapi=	libvmmapi
230.endif
231.endif
232
233.if ${MACHINE_CPUARCH} == "ia64"
234_libefi=	libefi
235.endif
236
237.if ${MACHINE_CPUARCH} == "mips"
238_libproc=	libproc
239_librtld_db=	librtld_db
240.endif
241
242.if ${MACHINE_CPUARCH} == "powerpc"
243_libproc=	libproc
244_librtld_db=	librtld_db
245.endif
246
247.if ${MK_OPENSSL} != "no"
248_libmp=		libmp
249.endif
250
251.if ${MK_PMC} != "no"
252_libpmc=	libpmc
253.endif
254
255.if ${MK_RADIUS_SUPPORT} != "no"
256_libradius=	libradius
257.endif
258
259.if ${MK_SENDMAIL} != "no"
260_libmilter=	libmilter
261_libsm=		libsm
262_libsmdb=	libsmdb
263_libsmutil=	libsmutil
264.endif
265
266.if ${MK_TELNET} != "no"
267_libtelnet=	libtelnet
268.endif
269
270.if ${MK_TESTS} != "no"
271_atf=		atf
272_tests=		tests
273.endif
274
275.if ${MK_UNBOUND} != "no"
276_libunbound=	libunbound
277.endif
278
279.if ${MK_USB} != "no"
280_libusbhid=	libusbhid
281_libusb=	libusb
282.endif
283
284.if !defined(LIBRARIES_ONLY)
285afterinstall:
286	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
287.endif
288
289.if !make(install)
290SUBDIR_PARALLEL=
291.endif
292
293.include <bsd.subdir.mk>
294