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