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