xref: /freebsd/lib/Makefile (revision 3fc36ee018bb836bd1796067cf4ef8683f166ebc)
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD$
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	${_libcasper} \
42	${_libcom_err} \
43	libcompat \
44	libcrypt \
45	libdevctl \
46	${_libdevdctl} \
47	libdevinfo \
48	libdevstat \
49	libdpv \
50	libdwarf \
51	libedit \
52	${_libelftc} \
53	libevent \
54	libexecinfo \
55	libexpat \
56	libfetch \
57	libfigpar \
58	libgeom \
59	${_libgpio} \
60	${_libgssapi} \
61	${_librpcsec_gss} \
62	${_libiconv_modules} \
63	libifconfig \
64	libipsec \
65	libjail \
66	libkiconv \
67	libkvm \
68	${_libldns} \
69	liblzma \
70	${_libmagic} \
71	libmemstat \
72	libmd \
73	${_libmilter} \
74	${_libmp} \
75	libmt \
76	${_libnandfs} \
77	lib80211 \
78	libnetbsd \
79	${_libnetgraph} \
80	${_libngatm} \
81	libnv \
82	libopenbsd \
83	libopie \
84	libpam \
85	libpcap \
86	${_libpe} \
87	libpjdlog \
88	${_libpmc} \
89	${_libproc} \
90	libprocstat \
91	${_libradius} \
92	librpcsvc \
93	librt \
94	${_librtld_db} \
95	libsbuf \
96	${_libsdp} \
97	${_libsm} \
98	libsmb \
99	${_libsmdb} \
100	${_libsmutil} \
101	libsqlite3 \
102	libstand \
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_liblibrpcsec_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
160# NB: keep these sorted by MK_* knobs
161
162.if ${MK_ATM} != "no"
163_libngatm=	libngatm
164.endif
165
166.if ${MK_BLACKLIST} != "no"
167_libblacklist=	libblacklist
168.endif
169
170.if ${MK_BLUETOOTH} != "no"
171_libbluetooth=	libbluetooth
172_libsdp=	libsdp
173.endif
174
175.if ${MK_BSNMP} != "no"
176_libbsnmp=	libbsnmp
177.endif
178
179.if ${MK_CASPER} != "no"
180_libcasper=	libcasper
181.endif
182
183.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
184_clang=		clang
185.endif
186
187.if ${MK_CUSE} != "no"
188_cuse=		libcuse
189.endif
190
191.if ${MK_CXX} != "no"
192_libdevdctl=	libdevdctl
193.endif
194
195.if ${MK_TOOLCHAIN} != "no"
196_libelftc=	libelftc
197_libpe=		libpe
198.endif
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_LIBTHR} != "no"
241_libthr=	libthr
242.endif
243
244.if ${MK_NAND} != "no"
245_libnandfs=	libnandfs
246.endif
247
248.if ${MK_NETGRAPH} != "no"
249_libnetgraph=	libnetgraph
250.endif
251
252.if ${MK_NIS} != "no"
253_libypclnt=	libypclnt
254.endif
255
256.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
257_libvgl=	libvgl
258_libproc=	libproc
259_librtld_db=	librtld_db
260.endif
261
262.if ${MACHINE_CPUARCH} == "amd64"
263.if ${MK_BHYVE} != "no"
264_libvmmapi=	libvmmapi
265.endif
266.endif
267
268.if ${MACHINE_CPUARCH} == "mips"
269_libproc=	libproc
270_librtld_db=	librtld_db
271.endif
272
273.if ${MACHINE_CPUARCH} == "powerpc"
274_libproc=	libproc
275_librtld_db=	librtld_db
276.endif
277
278.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
279    ${MACHINE_CPUARCH} == "riscv"
280_libproc=	libproc
281_librtld_db=	librtld_db
282.endif
283
284.if ${MK_OPENSSL} != "no"
285_libmp=		libmp
286.endif
287
288.if ${MK_PMC} != "no"
289_libpmc=	libpmc
290.endif
291
292.if ${MK_RADIUS_SUPPORT} != "no"
293_libradius=	libradius
294.endif
295
296.if ${MK_SENDMAIL} != "no"
297_libmilter=	libmilter
298_libsm=		libsm
299_libsmdb=	libsmdb
300_libsmutil=	libsmutil
301.endif
302
303.if ${MK_TELNET} != "no"
304_libtelnet=	libtelnet
305.endif
306
307.if ${MK_TESTS_SUPPORT} != "no"
308_atf=		atf
309.endif
310.if ${MK_TESTS} != "no"
311_tests=		tests
312.endif
313
314.if ${MK_UNBOUND} != "no"
315_libunbound=	libunbound
316.endif
317
318.if ${MK_USB} != "no"
319_libusbhid=	libusbhid
320_libusb=	libusb
321.endif
322
323.if !make(install)
324SUBDIR_PARALLEL=
325.endif
326
327.include <bsd.subdir.mk>
328