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