]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
[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         msun
22
23 # The main list; please keep these sorted alphabetically.
24
25 SUBDIR= ${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
104 SUBDIR_DEPEND_geom=     libufs
105 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
106 SUBDIR_DEPEND_libauditdm= libbsm
107 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
108 SUBDIR_DEPEND_libc++:= libcxxrt
109 SUBDIR_DEPEND_libc= libcompiler_rt
110 SUBDIR_DEPEND_libcam= libsbuf
111 SUBDIR_DEPEND_libcasper= libnv
112 SUBDIR_DEPEND_libdevstat= libkvm
113 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
114 SUBDIR_DEPEND_libedit= ncurses
115 SUBDIR_DEPEND_libgeom= libexpat libsbuf
116 SUBDIR_DEPEND_librpcsec_gss= libgssapi
117 SUBDIR_DEPEND_libmagic= libz
118 SUBDIR_DEPEND_libmemstat= libkvm
119 SUBDIR_DEPEND_libopie= libmd
120 SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
121 SUBDIR_DEPEND_libpjdlog= libutil
122 SUBDIR_DEPEND_libprocstat= libkvm libutil
123 SUBDIR_DEPEND_libradius= libmd
124 SUBDIR_DEPEND_libsmb= libkiconv
125 SUBDIR_DEPEND_libtacplus= libmd
126 SUBDIR_DEPEND_libulog= libmd
127 SUBDIR_DEPEND_libunbound= ${_libldns}
128 SUBDIR_DEPEND_liblzma= ${_libthr}
129 .if ${MK_OFED} != "no"
130 SUBDIR_DEPEND_libpcap= ofed
131 .endif
132
133 # NB: keep these sorted by MK_* knobs
134
135 SUBDIR.${MK_ATM}+=      libngatm
136 SUBDIR.${MK_BLACKLIST}+=libblacklist
137 SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
138 SUBDIR.${MK_BSNMP}+=    libbsnmp
139
140 .if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
141 SUBDIR.${MK_CLANG}+=    clang
142 .endif
143
144 SUBDIR.${MK_CUSE}+=     libcuse
145 SUBDIR.${MK_CXX}+=      libdevdctl
146 SUBDIR.${MK_TOOLCHAIN}+=libpe
147 SUBDIR.${MK_DIALOG}+=   libdpv
148 SUBDIR.${MK_FILE}+=     libmagic
149 SUBDIR.${MK_GPIO}+=     libgpio
150 SUBDIR.${MK_GSSAPI}+=   libgssapi librpcsec_gss
151 SUBDIR.${MK_ICONV}+=    libiconv_modules
152 SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err
153 SUBDIR.${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 _libcplusplus+= libc++fs
169 .endif
170
171 SUBDIR.${MK_EFI}+=      libefivar
172 SUBDIR.${MK_LIBTHR}+=   libthr
173 SUBDIR.${MK_LLVM_LIBUNWIND}+=   libgcc_eh
174 SUBDIR.${MK_LLVM_LIBUNWIND}+=   libgcc_s
175 SUBDIR.${MK_NAND}+=     libnandfs
176 SUBDIR.${MK_NETGRAPH}+= libnetgraph
177 SUBDIR.${MK_NIS}+=      libypclnt
178
179 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
180 _libvgl=        libvgl
181 .endif
182
183 .if ${MACHINE_CPUARCH} == "aarch64"
184 SUBDIR.${MK_PMC}+=      libopencsd
185 .endif
186
187 .if ${MACHINE_CPUARCH} == "amd64"
188 SUBDIR.${MK_PMC}+=      libipt
189 SUBDIR.${MK_BHYVE}+=    libvmmapi
190 .endif
191
192 .if ${MACHINE_CPUARCH} != "sparc64"
193 _libproc=       libproc
194 _librtld_db=    librtld_db
195 .endif
196
197 SUBDIR.${MK_OPENSSL}+=  libmp
198 SUBDIR.${MK_PMC}+=      libpmc libpmcstat
199 SUBDIR.${MK_RADIUS_SUPPORT}+=   libradius
200 SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil
201 SUBDIR.${MK_TELNET}+=   libtelnet
202 SUBDIR.${MK_TESTS_SUPPORT}+=    atf
203 SUBDIR.${MK_TESTS}+=    tests
204 SUBDIR.${MK_UNBOUND}+=  libunbound
205 SUBDIR.${MK_USB}+=      libusbhid libusb
206 SUBDIR.${MK_OFED}+=     ofed
207 SUBDIR.${MK_ZFS}+=      libbe
208
209 .if !make(install)
210 SUBDIR_PARALLEL=
211 .endif
212
213 .include <bsd.subdir.mk>