]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
zfs: merge openzfs/zfs@deb121309
[FreeBSD/FreeBSD.git] / lib / Makefile
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
11 SUBDIR_BOOTSTRAP= \
12         csu \
13         .WAIT \
14         libc \
15         libc_nonshared \
16         libcompiler_rt \
17         ${_libclang_rt} \
18         ${_libcplusplus} \
19         ${_libcxxrt} \
20         libelf \
21         libssp \
22         libssp_nonshared \
23         msun
24
25 # The main list; please keep these sorted alphabetically.
26 # The only exception is sqlite3: we place it at the start of the list since it
27 # takes a long time to build and starting it first improves parallelism.
28
29 SUBDIR= ${SUBDIR_BOOTSTRAP} \
30         .WAIT \
31         libsqlite3 \
32         geom \
33         lib9p \
34         libalias \
35         libarchive \
36         libauditd \
37         libbegemot \
38         libblocksruntime \
39         libbsddialog \
40         libbsdstat \
41         libbsm \
42         libbz2 \
43         libcalendar \
44         libcam \
45         libcapsicum \
46         libcasper \
47         libcompat \
48         libcrypt \
49         libdevctl \
50         libdevinfo \
51         libdevstat \
52         libdl \
53         libdwarf \
54         libedit \
55         libelftc \
56         libevent1 \
57         libexecinfo \
58         libexpat \
59         libfetch \
60         libfigpar \
61         libgcc_eh \
62         libgcc_s \
63         libgeom \
64         libifconfig \
65         libipsec \
66         libiscsiutil \
67         libjail \
68         libkiconv \
69         libkvm \
70         liblua \
71         liblzma \
72         libmemstat \
73         libmd \
74         libmixer \
75         libmt \
76         lib80211 \
77         libnetbsd \
78         libnetmap \
79         libnv \
80         libopenbsd \
81         libopie \
82         libpam \
83         libpathconv \
84         libpcap \
85         libpjdlog \
86         libproc \
87         libprocstat \
88         libregex \
89         librpcsvc \
90         librss \
91         librt \
92         librtld_db \
93         libsbuf \
94         libsmb \
95         libstdbuf \
96         libstdthreads \
97         libsysdecode \
98         libtacplus \
99         libthr \
100         libthread_db \
101         libucl \
102         libufs \
103         libugidfw \
104         libulog \
105         libutil \
106         ${_libvgl} \
107         libwrap \
108         libxo \
109         liby \
110         libz \
111         libzstd \
112         ncurses
113
114 # Inter-library dependencies.  When the makefile for a library contains LDADD
115 # libraries, those libraries should be listed as build order dependencies here.
116
117 SUBDIR_DEPEND_geom=     libufs
118 SUBDIR_DEPEND_googletest= libregex
119 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd
120 SUBDIR_DEPEND_libauditdm= libbsm
121 SUBDIR_DEPEND_libbsddialog= ncurses
122 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
123 SUBDIR_DEPEND_libc++:= libcxxrt
124 # libssp_nonshared doesn't need to be linked into libc on every arch, but it is
125 # small enough to build that this bit of serialization is likely insignificant.
126 SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared
127 SUBDIR_DEPEND_libcam= libsbuf
128 SUBDIR_DEPEND_libcasper= libnv
129 SUBDIR_DEPEND_libdevstat= libkvm
130 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
131 SUBDIR_DEPEND_libedit= ncurses
132 SUBDIR_DEPEND_libgeom= libexpat libsbuf
133 SUBDIR_DEPEND_librpcsec_gss= libgssapi
134 SUBDIR_DEPEND_libmagic= libz
135 SUBDIR_DEPEND_libmemstat= libkvm
136 SUBDIR_DEPEND_libopie= libmd
137 SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
138 SUBDIR_DEPEND_libpjdlog= libutil
139 SUBDIR_DEPEND_libprocstat= libkvm libutil
140 SUBDIR_DEPEND_libradius= libmd
141 SUBDIR_DEPEND_libsmb= libkiconv
142 SUBDIR_DEPEND_libtacplus= libmd
143 SUBDIR_DEPEND_libulog= libmd
144 SUBDIR_DEPEND_libunbound= ${_libldns}
145 SUBDIR_DEPEND_liblzma= libthr
146 .if ${MK_OFED} != "no"
147 SUBDIR_DEPEND_libpcap= ofed
148 .endif
149
150 .if !defined(COMPAT_32BIT)
151 SUBDIR+=        flua
152 SUBDIR_DEPEND_flua=     libjail
153 .endif
154
155 # NB: keep these sorted by MK_* knobs
156
157 SUBDIR.${MK_ATM}+=      libngatm
158 SUBDIR.${MK_BEARSSL}+=  libbearssl libsecureboot
159 SUBDIR.${MK_BLACKLIST}+=libblacklist
160 SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
161 SUBDIR.${MK_BSNMP}+=    libbsnmp
162
163 .if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
164 .if ${MK_CLANG} != "no" || ${MK_LLD} != "no" || \
165     ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no"
166 SUBDIR+=        clang
167 .endif
168 .endif
169
170 SUBDIR.${MK_CUSE}+=     libcuse
171 SUBDIR.${MK_CXX}+=      libdevdctl
172 SUBDIR.${MK_TOOLCHAIN}+=libpe
173 SUBDIR.${MK_DIALOG}+=   libdpv
174 SUBDIR.${MK_FILE}+=     libmagic
175 SUBDIR.${MK_GPIO}+=     libgpio
176 SUBDIR.${MK_GSSAPI}+=   libgssapi librpcsec_gss
177 SUBDIR.${MK_ICONV}+=    libiconv_modules
178 SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err
179 SUBDIR.${MK_LDNS}+=     libldns
180 SUBDIR.${MK_STATS}+=    libstats
181
182 # The libraries under libclang_rt can only be built by clang and when we enable
183 # C++ support.  Furthermore, they can only be built for certain architectures.
184 .if ${COMPILER_TYPE} == "clang" && ${MK_CXX} != "no" && \
185     (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
186     ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
187     ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "riscv")
188 _libclang_rt=   libclang_rt
189 .elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all)
190 .error Requested build with sanitizers but cannot build runtime libraries!
191 .endif
192
193 .if ${MK_CXX} != "no"
194 _libcxxrt=      libcxxrt
195 _libcplusplus=  libc++
196 _libcplusplus+= libc++experimental
197 .endif
198
199 SUBDIR.${MK_EFI}+=      libefivar
200 SUBDIR.${MK_GOOGLETEST}+=       googletest
201 SUBDIR.${MK_NETGRAPH}+= libnetgraph
202 SUBDIR.${MK_NIS}+=      libypclnt
203
204 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
205 _libvgl=        libvgl
206 .endif
207
208 .if ${MACHINE_CPUARCH} == "aarch64"
209 SUBDIR.${MK_PMC}+=      libopencsd
210 .endif
211
212 .if ${MACHINE_CPUARCH} == "amd64"
213 SUBDIR.${MK_PMC}+=      libipt
214 SUBDIR.${MK_BHYVE}+=    libvmmapi
215 .endif
216
217 .if ${MACHINE_ARCH} != "powerpc"
218 SUBDIR.${MK_OPENMP}+=   libomp
219 .endif
220 .if !defined(COMPAT_32BIT) && ${MK_USB} != "no"
221 SUBDIR.${MK_OPENSSH}+=  libcbor libfido2
222 .endif
223 SUBDIR.${MK_OPENSSL}+=  libmp
224 SUBDIR.${MK_PF}+=       libpfctl
225 SUBDIR.${MK_PMC}+=      libpmc libpmcstat
226 SUBDIR.${MK_RADIUS_SUPPORT}+=   libradius
227 SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil
228 SUBDIR.${MK_TELNET}+=   libtelnet
229 SUBDIR.${MK_TESTS_SUPPORT}+=    atf
230 SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+=  liblutok
231 SUBDIR.${MK_TESTS}+=    tests
232 SUBDIR.${MK_UNBOUND}+=  libunbound
233 SUBDIR.${MK_USB}+=      libusbhid libusb
234 SUBDIR.${MK_OFED}+=     ofed
235 SUBDIR.${MK_VERIEXEC}+= libveriexec
236 SUBDIR.${MK_ZFS}+=      libbe
237
238 .if !make(install)
239 SUBDIR_PARALLEL=
240 .endif
241
242 .include <bsd.subdir.mk>