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 11SUBDIR_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 25SUBDIR= ${SUBDIR_BOOTSTRAP} \ 26 .WAIT \ 27 libalias \ 28 libarchive \ 29 ${_libatm} \ 30 libauditd \ 31 libbegemot \ 32 ${_libblacklist} \ 33 libblocksruntime \ 34 ${_libbluetooth} \ 35 ${_libbsnmp} \ 36 libbsdstat \ 37 libbsm \ 38 libbz2 \ 39 libcalendar \ 40 libcam \ 41 libcapsicum \ 42 ${_libcasper} \ 43 ${_libcom_err} \ 44 libcompat \ 45 libcrypt \ 46 libdevctl \ 47 ${_libdevdctl} \ 48 libdevinfo \ 49 libdevstat \ 50 libdwarf \ 51 libedit \ 52 ${_libelftc} \ 53 libevent \ 54 libexecinfo \ 55 libexpat \ 56 libfetch \ 57 libfigpar \ 58 libgeom \ 59 ${_libgpio} \ 60 ${_libgssapi} \ 61 ${_librpcsec_gss} \ 62 ${_libiconv_modules} \ 63 libifconfig \ 64 libipsec \ 65 libjail \ 66 libkiconv \ 67 libkvm \ 68 ${_libldns} \ 69 liblzma \ 70 ${_libmagic} \ 71 libmemstat \ 72 libmd \ 73 ${_libmilter} \ 74 ${_libmp} \ 75 libmt \ 76 ${_libnandfs} \ 77 lib80211 \ 78 libnetbsd \ 79 ${_libnetgraph} \ 80 ${_libngatm} \ 81 libnv \ 82 libopenbsd \ 83 libopie \ 84 libpam \ 85 libpcap \ 86 ${_libpe} \ 87 libpjdlog \ 88 ${_libpmc} \ 89 ${_libproc} \ 90 libprocstat \ 91 ${_libradius} \ 92 librpcsvc \ 93 librss \ 94 librt \ 95 ${_librtld_db} \ 96 libsbuf \ 97 ${_libsdp} \ 98 ${_libsm} \ 99 libsmb \ 100 ${_libsmdb} \ 101 ${_libsmutil} \ 102 libsqlite3 \ 103 libstand \ 104 libstdbuf \ 105 libstdthreads \ 106 libsysdecode \ 107 libtacplus \ 108 ${_libtelnet} \ 109 ${_libthr} \ 110 libthread_db \ 111 libucl \ 112 libufs \ 113 libugidfw \ 114 libulog \ 115 ${_libunbound} \ 116 ${_libusbhid} \ 117 ${_libusb} \ 118 libutil \ 119 ${_libvgl} \ 120 ${_libvmmapi} \ 121 libwrap \ 122 libxo \ 123 liby \ 124 ${_libypclnt} \ 125 libz \ 126 ncurses \ 127 ${_atf} \ 128 ${_clang} \ 129 ${_cuse} \ 130 ${_tests} 131 132# Inter-library dependencies. When the makefile for a library contains LDADD 133# libraries, those libraries should be listed as build order dependencies here. 134 135SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd 136SUBDIR_DEPEND_libatm= libmd 137SUBDIR_DEPEND_libauditdm= libbsm 138SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 139SUBDIR_DEPEND_libc++:= libcxxrt 140SUBDIR_DEPEND_libc= libcompiler_rt 141SUBDIR_DEPEND_libcam= libsbuf 142SUBDIR_DEPEND_libcasper= libnv 143SUBDIR_DEPEND_libdevstat= libkvm 144SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 145SUBDIR_DEPEND_libedit= ncurses 146SUBDIR_DEPEND_libgeom= libexpat libsbuf 147SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi 148SUBDIR_DEPEND_libmagic= libz 149SUBDIR_DEPEND_libmemstat= libkvm 150SUBDIR_DEPEND_libopie= libmd 151SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 152SUBDIR_DEPEND_libpjdlog= libutil 153SUBDIR_DEPEND_libprocstat= libkvm libutil 154SUBDIR_DEPEND_libradius= libmd 155SUBDIR_DEPEND_libsmb= libkiconv 156SUBDIR_DEPEND_libtacplus= libmd 157SUBDIR_DEPEND_libulog= libmd 158SUBDIR_DEPEND_libunbound= ${_libldns} 159SUBDIR_DEPEND_liblzma= ${_libthr} 160 161# NB: keep these sorted by MK_* knobs 162 163.if ${MK_ATM} != "no" 164_libngatm= libngatm 165.endif 166 167.if ${MK_BLACKLIST} != "no" 168_libblacklist= libblacklist 169.endif 170 171.if ${MK_BLUETOOTH} != "no" 172_libbluetooth= libbluetooth 173_libsdp= libsdp 174.endif 175 176.if ${MK_BSNMP} != "no" 177_libbsnmp= libbsnmp 178.endif 179 180.if ${MK_CASPER} != "no" 181_libcasper= libcasper 182.endif 183 184.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) 185_clang= clang 186.endif 187 188.if ${MK_CUSE} != "no" 189_cuse= libcuse 190.endif 191 192.if ${MK_CXX} != "no" 193_libdevdctl= libdevdctl 194.endif 195 196.if ${MK_TOOLCHAIN} != "no" 197_libelftc= libelftc 198_libpe= libpe 199.endif 200 201SUBDIR.${MK_DIALOG}+= libdpv 202 203.if ${MK_FILE} != "no" 204_libmagic= libmagic 205.endif 206 207.if ${MK_GPIO} != "no" 208_libgpio= libgpio 209.endif 210 211.if ${MK_GSSAPI} != "no" 212_libgssapi= libgssapi 213_librpcsec_gss= librpcsec_gss 214.endif 215 216.if ${MK_ICONV} != "no" 217_libiconv_modules= libiconv_modules 218.endif 219 220.if ${MK_KERBEROS_SUPPORT} != "no" 221_libcom_err= libcom_err 222.endif 223 224.if ${MK_LDNS} != "no" 225_libldns= libldns 226.endif 227 228# The libraries under libclang_rt can only be built by clang, and only make 229# sense to build when clang is enabled at all. Furthermore, they can only be 230# built for certain architectures. 231.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ 232 (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 233 (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \ 234 (${MACHINE_CPUARCH} == "i386")) 235_libclang_rt= libclang_rt 236.endif 237 238.if ${MK_LIBCPLUSPLUS} != "no" 239_libcxxrt= libcxxrt 240_libcplusplus= libc++ 241.endif 242 243.if ${MK_LIBTHR} != "no" 244_libthr= libthr 245.endif 246 247.if ${MK_NAND} != "no" 248_libnandfs= libnandfs 249.endif 250 251.if ${MK_NETGRAPH} != "no" 252_libnetgraph= libnetgraph 253.endif 254 255.if ${MK_NIS} != "no" 256_libypclnt= libypclnt 257.endif 258 259.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 260_libvgl= libvgl 261_libproc= libproc 262_librtld_db= librtld_db 263.endif 264 265.if ${MACHINE_CPUARCH} == "amd64" 266.if ${MK_BHYVE} != "no" 267_libvmmapi= libvmmapi 268.endif 269.endif 270 271.if ${MACHINE_CPUARCH} == "mips" 272_libproc= libproc 273_librtld_db= librtld_db 274.endif 275 276.if ${MACHINE_CPUARCH} == "powerpc" 277_libproc= libproc 278_librtld_db= librtld_db 279.endif 280 281.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ 282 ${MACHINE_CPUARCH} == "riscv" 283_libproc= libproc 284_librtld_db= librtld_db 285.endif 286 287.if ${MK_OPENSSL} != "no" 288_libmp= libmp 289.endif 290 291.if ${MK_PMC} != "no" 292_libpmc= libpmc 293.endif 294 295.if ${MK_RADIUS_SUPPORT} != "no" 296_libradius= libradius 297.endif 298 299.if ${MK_SENDMAIL} != "no" 300_libmilter= libmilter 301_libsm= libsm 302_libsmdb= libsmdb 303_libsmutil= libsmutil 304.endif 305 306.if ${MK_TELNET} != "no" 307_libtelnet= libtelnet 308.endif 309 310.if ${MK_TESTS_SUPPORT} != "no" 311_atf= atf 312.endif 313.if ${MK_TESTS} != "no" 314_tests= tests 315.endif 316 317.if ${MK_UNBOUND} != "no" 318_libunbound= libunbound 319.endif 320 321.if ${MK_USB} != "no" 322_libusbhid= libusbhid 323_libusb= libusb 324.endif 325 326.if !make(install) 327SUBDIR_PARALLEL= 328.endif 329 330.include <bsd.subdir.mk> 331