1 # @(#)Makefile 8.1 (Berkeley) 6/4/93
6 # The SUBDIR_ORDERED 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.
22 # The main list; please keep these sorted alphabetically.
24 SUBDIR= ${SUBDIR_ORDERED} \
60 ${_libiconv_modules} \
125 # Inter-library dependencies. When the makefile for a library contains LDADD
126 # libraries, those libraries should be listed as build order dependencies here.
128 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
129 SUBDIR_DEPEND_libatm= libmd
130 SUBDIR_DEPEND_libauditdm= libbsm
131 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
132 SUBDIR_DEPEND_libc++:= libcxxrt
133 SUBDIR_DEPEND_libc= libcompiler_rt
134 SUBDIR_DEPEND_libcam= libsbuf
135 SUBDIR_DEPEND_libcapsicum= libnv
136 SUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog
137 SUBDIR_DEPEND_libdevstat= libkvm
138 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
139 SUBDIR_DEPEND_libedit= ncurses
140 SUBDIR_DEPEND_libgeom= libexpat libsbuf
141 SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
142 SUBDIR_DEPEND_libmagic= libz
143 SUBDIR_DEPEND_libmemstat= libkvm
144 SUBDIR_DEPEND_libopie= libmd
145 SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
146 SUBDIR_DEPEND_libpjdlog= libutil
147 SUBDIR_DEPEND_libprocstat= libkvm libutil
148 SUBDIR_DEPEND_libradius= libmd
149 SUBDIR_DEPEND_libsmb= libkiconv
150 SUBDIR_DEPEND_libtacplus= libmd
151 SUBDIR_DEPEND_libulog= libmd
152 SUBDIR_DEPEND_libunbound= ${_libldns}
153 SUBDIR_DEPEND_liblzma= ${_libthr}
155 # NB: keep these sorted by MK_* knobs
157 .if ${MK_ATM} != "no"
161 .if ${MK_BLUETOOTH} != "no"
162 _libbluetooth= libbluetooth
166 .if ${MK_BSNMP} != "no"
170 .if ${MK_CASPER} != "no"
171 _libcapsicum= libcapsicum
172 _libcasper= libcasper
175 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
179 .if ${MK_CUSE} != "no"
183 .if ${MK_TOOLCHAIN} != "no"
187 .if ${MK_FILE} != "no"
191 .if ${MK_GPIO} != "no"
195 .if ${MK_GSSAPI} != "no"
196 _libgssapi= libgssapi
197 _librpcsec_gss= librpcsec_gss
200 .if ${MK_ICONV} != "no"
201 _libiconv_modules= libiconv_modules
204 .if ${MK_KERBEROS_SUPPORT} != "no"
205 _libcom_err= libcom_err
208 .if ${MK_LDNS} != "no"
212 # The libraries under libclang_rt can only be built by clang, and only make
213 # sense to build when clang is enabled at all. Furthermore, they can only be
214 # built for certain architectures.
215 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
216 (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
217 (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
218 (${MACHINE_CPUARCH} == "i386"))
219 _libclang_rt= libclang_rt
222 .if ${MK_LIBCPLUSPLUS} != "no"
224 _libcplusplus= libc++
227 .if ${MK_LIBTHR} != "no"
231 .if ${MK_NAND} != "no"
232 _libnandfs= libnandfs
235 .if ${MK_NETGRAPH} != "no"
236 _libnetgraph= libnetgraph
239 .if ${MK_NIS} != "no"
240 _libypclnt= libypclnt
243 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
247 _librtld_db= librtld_db
250 .if ${MACHINE_CPUARCH} == "amd64"
251 .if ${MK_BHYVE} != "no"
252 _libvmmapi= libvmmapi
256 .if ${MACHINE_CPUARCH} == "mips"
258 _librtld_db= librtld_db
261 .if ${MACHINE_CPUARCH} == "powerpc"
263 _librtld_db= librtld_db
267 .if ${MACHINE_CPUARCH} == "sparc64"
271 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
274 _librtld_db= librtld_db
277 .if ${MK_OPENSSL} != "no"
281 .if ${MK_PMC} != "no"
285 .if ${MK_RADIUS_SUPPORT} != "no"
286 _libradius= libradius
289 .if ${MK_SENDMAIL} != "no"
290 _libmilter= libmilter
293 _libsmutil= libsmutil
296 .if ${MK_TELNET} != "no"
297 _libtelnet= libtelnet
300 .if ${MK_TESTS_SUPPORT} != "no"
303 .if ${MK_TESTS} != "no"
307 .if ${MK_UNBOUND} != "no"
308 _libunbound= libunbound
311 .if ${MK_USB} != "no"
312 _libusbhid= libusbhid
316 .if !defined(LIBRARIES_ONLY)
318 ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
325 .include <bsd.subdir.mk>