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