xref: /freebsd/lib/Makefile (revision 190cef3d)
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	geom \
28	libalias \
29	libarchive \
30	libauditd \
31	libbegemot \
32	libblocksruntime \
33	libbsdstat \
34	libbsm \
35	libbz2 \
36	libcalendar \
37	libcam \
38	libcapsicum \
39	libcasper \
40	libcompat \
41	libcrypt \
42	libdevctl \
43	libdevinfo \
44	libdevstat \
45	${_libdl} \
46	libdwarf \
47	libedit \
48	libelftc \
49	libevent \
50	libexecinfo \
51	libexpat \
52	libfetch \
53	libfigpar \
54	libgeom \
55	libifconfig \
56	libipsec \
57	libjail \
58	libkiconv \
59	libkvm \
60	liblzma \
61	libmemstat \
62	libmd \
63	libmt \
64	lib80211 \
65	libnetbsd \
66	libnv \
67	libopenbsd \
68	libopie \
69	libpam \
70	libpathconv \
71	libpcap \
72	libpjdlog \
73	${_libproc} \
74	libprocstat \
75	libregex \
76	librpcsvc \
77	librss \
78	librt \
79	${_librtld_db} \
80	libsbuf \
81	libsmb \
82	libsqlite3 \
83	libstdbuf \
84	libstdthreads \
85	libsysdecode \
86	libtacplus \
87	libthread_db \
88	libucl \
89	libufs \
90	libugidfw \
91	libulog \
92	libutil \
93	${_libvgl} \
94	libwrap \
95	libxo \
96	liby \
97	libz \
98	libzstd \
99	ncurses
100
101# Inter-library dependencies.  When the makefile for a library contains LDADD
102# libraries, those libraries should be listed as build order dependencies here.
103
104SUBDIR_DEPEND_geom=	libufs
105SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
106SUBDIR_DEPEND_libauditdm= libbsm
107SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
108SUBDIR_DEPEND_libc++:= libcxxrt
109SUBDIR_DEPEND_libc= libcompiler_rt
110SUBDIR_DEPEND_libcam= libsbuf
111SUBDIR_DEPEND_libcasper= libnv
112SUBDIR_DEPEND_libdevstat= libkvm
113SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
114SUBDIR_DEPEND_libedit= ncurses
115SUBDIR_DEPEND_libgeom= libexpat libsbuf
116SUBDIR_DEPEND_librpcsec_gss= libgssapi
117SUBDIR_DEPEND_libmagic= libz
118SUBDIR_DEPEND_libmemstat= libkvm
119SUBDIR_DEPEND_libopie= libmd
120SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
121SUBDIR_DEPEND_libpjdlog= libutil
122SUBDIR_DEPEND_libprocstat= libkvm libutil
123SUBDIR_DEPEND_libradius= libmd
124SUBDIR_DEPEND_libsmb= libkiconv
125SUBDIR_DEPEND_libtacplus= libmd
126SUBDIR_DEPEND_libulog= libmd
127SUBDIR_DEPEND_libunbound= ${_libldns}
128SUBDIR_DEPEND_liblzma= ${_libthr}
129.if ${MK_OFED} != "no"
130SUBDIR_DEPEND_libpcap= ofed
131.endif
132
133# NB: keep these sorted by MK_* knobs
134
135SUBDIR.${MK_ATM}+=	libngatm
136SUBDIR.${MK_BLACKLIST}+=libblacklist
137SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
138SUBDIR.${MK_BSNMP}+=	libbsnmp
139
140.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
141SUBDIR.${MK_CLANG}+=	clang
142.endif
143
144SUBDIR.${MK_CUSE}+= 	libcuse
145SUBDIR.${MK_CXX}+=	libdevdctl
146SUBDIR.${MK_TOOLCHAIN}+=libpe
147SUBDIR.${MK_DIALOG}+=	libdpv
148SUBDIR.${MK_FILE}+=	libmagic
149SUBDIR.${MK_GPIO}+=	libgpio
150SUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
151SUBDIR.${MK_ICONV}+=	libiconv_modules
152SUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
153SUBDIR.${MK_LDNS}+=	libldns
154
155# The libraries under libclang_rt can only be built by clang, and only make
156# sense to build when clang is enabled at all.  Furthermore, they can only be
157# built for certain architectures.
158.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
159    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
160    ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386")
161_libclang_rt=	libclang_rt
162.endif
163
164.if ${MK_LIBCPLUSPLUS} != "no"
165_libcxxrt=	libcxxrt
166_libcplusplus=	libc++
167_libcplusplus+=	libc++experimental
168.endif
169
170SUBDIR.${MK_EFI}+=	libefivar
171SUBDIR.${MK_LIBTHR}+=	libthr
172SUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_eh
173SUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_s
174SUBDIR.${MK_NAND}+=	libnandfs
175SUBDIR.${MK_NETGRAPH}+=	libnetgraph
176SUBDIR.${MK_NIS}+=	libypclnt
177
178.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
179_libvgl=	libvgl
180.endif
181
182.if ${MACHINE_CPUARCH} == "aarch64"
183SUBDIR.${MK_PMC}+=	libopencsd
184.endif
185
186.if ${MACHINE_CPUARCH} == "amd64"
187SUBDIR.${MK_PMC}+=	libipt
188SUBDIR.${MK_BHYVE}+=	libvmmapi
189.endif
190
191.if ${MACHINE_CPUARCH} != "sparc64"
192_libproc=	libproc
193_librtld_db=	librtld_db
194.endif
195
196.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
197_libdl=		libdl
198.endif
199
200SUBDIR.${MK_OPENSSL}+=	libmp
201.if (${COMPILER_TYPE} == "clang" || (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 && ${MACHINE_CPUARCH} != "riscv"))
202SUBDIR.${MK_PMC}+=	libpmc libpmcstat
203.endif
204SUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
205SUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
206SUBDIR.${MK_TELNET}+=	libtelnet
207SUBDIR.${MK_TESTS_SUPPORT}+=	atf
208SUBDIR.${MK_TESTS}+=	tests
209SUBDIR.${MK_UNBOUND}+=	libunbound
210SUBDIR.${MK_USB}+=	libusbhid libusb
211SUBDIR.${MK_OFED}+=	ofed
212SUBDIR.${MK_ZFS}+=	libbe
213
214.if !make(install)
215SUBDIR_PARALLEL=
216.endif
217
218.include <bsd.subdir.mk>
219