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