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