Makefile revision 356775
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: stable/11/lib/Makefile 356775 2020-01-16 03:38:06Z kevans $
3
4.include <src.opts.mk>
5
6# The SUBDIR_BOOTSTRAP 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_BOOTSTRAP= \
12	csu \
13	.WAIT \
14	libc \
15	libc_nonshared \
16	libcompiler_rt \
17	${_libclang_rt} \
18	${_libcplusplus} \
19	${_libcxxrt} \
20	libelf \
21	libssp \
22	libssp_nonshared \
23	msun
24
25# The main list; please keep these sorted alphabetically.
26
27SUBDIR=	${SUBDIR_BOOTSTRAP} \
28	.WAIT \
29	libalias \
30	libarchive \
31	${_libatm} \
32	libauditd \
33	libbegemot \
34	${_libblacklist} \
35	libblocksruntime \
36	${_libbluetooth} \
37	${_libbsnmp} \
38	libbsdstat \
39	libbsm \
40	libbz2 \
41	libcalendar \
42	libcam \
43	libcapsicum \
44	${_libcasper} \
45	${_libcom_err} \
46	libcompat \
47	libcrypt \
48	libdevctl \
49	libdevdctl \
50	libdevinfo \
51	libdevstat \
52	${_libdl} \
53	libdwarf \
54	libedit \
55	${_libefivar} \
56	libelftc \
57	libevent \
58	libexecinfo \
59	libexpat \
60	libfetch \
61	libfigpar \
62	libgeom \
63	${_libgpio} \
64	${_libgssapi} \
65	${_librpcsec_gss} \
66	${_libiconv_modules} \
67	libipsec \
68	libjail \
69	libkiconv \
70	libkvm \
71	${_libldns} \
72	liblzma \
73	${_libmagic} \
74	libmemstat \
75	libmd \
76	${_libmilter} \
77	${_libmp} \
78	libmt \
79	${_libnandfs} \
80	lib80211 \
81	libnetbsd \
82	${_libnetgraph} \
83	${_libngatm} \
84	libnv \
85	libopenbsd \
86	libopie \
87	libpam \
88	libpcap \
89	${_libpe} \
90	libpjdlog \
91	${_libpmc} \
92	${_libproc} \
93	libprocstat \
94	${_libradius} \
95	librpcsvc \
96	librt \
97	${_librtld_db} \
98	libsbuf \
99	${_libsdp} \
100	${_libsm} \
101	libsmb \
102	${_libsmdb} \
103	${_libsmutil} \
104	libsqlite3 \
105	libstdbuf \
106	libstdthreads \
107	libsysdecode \
108	libtacplus \
109	${_libtelnet} \
110	${_libthr} \
111	libthread_db \
112	libucl \
113	libufs \
114	libugidfw \
115	libulog \
116	${_libunbound} \
117	${_libusbhid} \
118	${_libusb} \
119	libutil \
120	${_libvgl} \
121	${_libvmmapi} \
122	libwrap \
123	libxo \
124	liby \
125	${_libypclnt} \
126	libz \
127	ncurses \
128	${_atf} \
129	${_clang} \
130	${_cuse} \
131	${_tests}
132
133# Inter-library dependencies.  When the makefile for a library contains LDADD
134# libraries, those libraries should be listed as build order dependencies here.
135
136SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
137SUBDIR_DEPEND_libatm= libmd
138SUBDIR_DEPEND_libauditdm= libbsm
139SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
140SUBDIR_DEPEND_libc++:= libcxxrt
141# libssp_nonshared doesn't need to be linked into libc on every arch, but it is
142# small enough to build that this bit of serialization is likely insignificant.
143SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared
144SUBDIR_DEPEND_libcam= libsbuf
145SUBDIR_DEPEND_libcasper= libnv
146SUBDIR_DEPEND_libdevstat= libkvm
147SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
148SUBDIR_DEPEND_libedit= ncurses
149SUBDIR_DEPEND_libgeom= libexpat libsbuf
150SUBDIR_DEPEND_librpcsec_gss= libgssapi
151SUBDIR_DEPEND_libmagic= libz
152SUBDIR_DEPEND_libmemstat= libkvm
153SUBDIR_DEPEND_libopie= libmd
154SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
155SUBDIR_DEPEND_libpjdlog= libutil
156SUBDIR_DEPEND_libprocstat= libkvm libutil
157SUBDIR_DEPEND_libradius= libmd
158SUBDIR_DEPEND_libsmb= libkiconv
159SUBDIR_DEPEND_libtacplus= libmd
160SUBDIR_DEPEND_libulog= libmd
161SUBDIR_DEPEND_libunbound= ${_libldns}
162SUBDIR_DEPEND_liblzma= ${_libthr}
163.if ${MK_OFED} != "no"
164SUBDIR_DEPEND_libpcap= ofed
165.endif
166
167# NB: keep these sorted by MK_* knobs
168
169.if ${MK_ATM} != "no"
170_libngatm=	libngatm
171.endif
172
173.if ${MK_BLACKLIST} != "no"
174_libblacklist=	libblacklist
175.endif
176
177.if ${MK_BLUETOOTH} != "no"
178_libbluetooth=	libbluetooth
179_libsdp=	libsdp
180.endif
181
182.if ${MK_BSNMP} != "no"
183_libbsnmp=	libbsnmp
184.endif
185
186.if ${MK_CASPER} != "no"
187_libcasper=	libcasper
188.endif
189
190.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
191_clang=		clang
192.endif
193
194.if ${MK_CUSE} != "no"
195_cuse=		libcuse
196.endif
197
198.if ${MK_TOOLCHAIN} != "no"
199_libpe=		libpe
200.endif
201
202SUBDIR.${MK_DIALOG}+=	libdpv
203
204.if ${MK_FILE} != "no"
205_libmagic=	libmagic
206.endif
207
208.if ${MK_GPIO} != "no"
209_libgpio=	libgpio
210.endif
211
212.if ${MK_GSSAPI} != "no"
213_libgssapi=	libgssapi
214_librpcsec_gss=	librpcsec_gss
215.endif
216
217.if ${MK_ICONV} != "no"
218_libiconv_modules=	libiconv_modules
219.endif
220
221.if ${MK_KERBEROS_SUPPORT} != "no"
222_libcom_err= libcom_err
223.endif
224
225.if ${MK_LDNS} != "no"
226_libldns=	libldns
227.endif
228
229# The libraries under libclang_rt can only be built by clang, and only make
230# sense to build when clang is enabled at all.  Furthermore, they can only be
231# built for certain architectures.
232.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
233    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
234    (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
235    (${MACHINE_CPUARCH} == "i386"))
236_libclang_rt=	libclang_rt
237.endif
238
239.if ${MK_LIBCPLUSPLUS} != "no"
240_libcxxrt=	libcxxrt
241_libcplusplus=	libc++ libc++experimental
242_libcplusplus+=	libc++fs
243.endif
244
245.if ${MK_EFI} != "no"
246_libefivar=	libefivar
247.endif
248
249.if ${MK_LIBTHR} != "no"
250_libthr=	libthr
251.endif
252
253.if ${MK_NAND} != "no"
254_libnandfs=	libnandfs
255.endif
256
257.if ${MK_NETGRAPH} != "no"
258_libnetgraph=	libnetgraph
259.endif
260
261.if ${MK_NIS} != "no"
262_libypclnt=	libypclnt
263.endif
264
265.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
266_libvgl=	libvgl
267_libproc=	libproc
268_librtld_db=	librtld_db
269.endif
270
271.if ${MACHINE_CPUARCH} == "amd64"
272.if ${MK_BHYVE} != "no"
273_libvmmapi=	libvmmapi
274.endif
275.endif
276
277.if ${MACHINE_CPUARCH} == "mips"
278_libproc=	libproc
279_librtld_db=	librtld_db
280.endif
281
282.if ${MACHINE_CPUARCH} == "powerpc"
283_libproc=	libproc
284_librtld_db=	librtld_db
285.endif
286
287.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
288_libdl=		libdl
289.endif
290
291.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
292    ${MACHINE_CPUARCH} == "riscv"
293_libproc=	libproc
294_librtld_db=	librtld_db
295.endif
296SUBDIR.${MK_OFED}+=	ofed
297SUBDIR.${MK_ZFS}+=	libbe
298
299SUBDIR.${MK_OPENMP}+=	libomp
300
301.if ${MK_OPENSSL} != "no"
302_libmp=		libmp
303.endif
304
305.if ${MK_PMC} != "no"
306_libpmc=	libpmc
307.endif
308
309.if ${MK_RADIUS_SUPPORT} != "no"
310_libradius=	libradius
311.endif
312
313.if ${MK_SENDMAIL} != "no"
314_libmilter=	libmilter
315_libsm=		libsm
316_libsmdb=	libsmdb
317_libsmutil=	libsmutil
318.endif
319
320.if ${MK_TELNET} != "no"
321_libtelnet=	libtelnet
322.endif
323
324.if ${MK_TESTS_SUPPORT} != "no"
325_atf=		atf
326.endif
327.if ${MK_TESTS} != "no"
328_tests=		tests
329.endif
330
331.if ${MK_UNBOUND} != "no"
332_libunbound=	libunbound
333.endif
334
335.if ${MK_USB} != "no"
336_libusbhid=	libusbhid
337_libusb=	libusb
338.endif
339
340.if !make(install)
341SUBDIR_PARALLEL=
342.endif
343
344.include <bsd.subdir.mk>
345