1c6063d0dSWarner Losh.include <src.opts.mk> 2e1fe3dbaSRuslan Ermilov 3fa6d79e8SBryan Drewery# The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many 4a1c70d69SIan Lepore# of the other libraries. These are built first with a .WAIT between them 5a1c70d69SIan Lepore# and the main list to avoid needing a SUBDIR_DEPEND line on every library 6a1c70d69SIan Lepore# naming just these few items. 7c9811e98SBruce Evans 8fa6d79e8SBryan DrewerySUBDIR_BOOTSTRAP= \ 9fa6d79e8SBryan Drewery csu \ 10b8fffe16SWarner Losh .WAIT \ 119b3e440bSWarner Losh libc \ 12091b8336SPeter Wemm libc_nonshared \ 1339cd938cSEd Schouten libcompiler_rt \ 148028b78dSDimitry Andric ${_libclang_rt} \ 15ac4c695aSEd Maste libc++ \ 16ac4c695aSEd Maste libc++experimental \ 17ac4c695aSEd Maste libcxxrt \ 18d9a9f23dSDag-Erling Smørgrav libdiff \ 19a1c70d69SIan Lepore libelf \ 20cd0d51baSKyle Evans libssp \ 21cd0d51baSKyle Evans libssp_nonshared \ 22e9d96105SBrooks Davis libsys \ 23a1c70d69SIan Lepore msun 249b3e440bSWarner Losh 25a1c70d69SIan Lepore# The main list; please keep these sorted alphabetically. 2618de62a9SAlex Richardson# The only exception is sqlite3: we place it at the start of the list since it 2718de62a9SAlex Richardson# takes a long time to build and starting it first improves parallelism. 280e46933cSStanislav Sedov 29fa6d79e8SBryan DrewerySUBDIR= ${SUBDIR_BOOTSTRAP} \ 30b8fffe16SWarner Losh .WAIT \ 3118de62a9SAlex Richardson libsqlite3 \ 32e4b0a90eSBrooks Davis geom \ 33100353cfSJakub Wojciech Klama lib9p \ 349b3e440bSWarner Losh libalias \ 359b3e440bSWarner Losh libarchive \ 36a1c70d69SIan Lepore libauditd \ 379b3e440bSWarner Losh libbegemot \ 3839cd938cSEd Schouten libblocksruntime \ 3937d0601fSBaptiste Daroussin libbsddialog \ 4081bd3d89SAdrian Chadd libbsdstat \ 41a1c70d69SIan Lepore libbsm \ 429b3e440bSWarner Losh libbz2 \ 439b3e440bSWarner Losh libcalendar \ 449b3e440bSWarner Losh libcam \ 457a6e3cf8SMariusz Zaborski libcapsicum \ 46ceb36bc9SMariusz Zaborski libcasper \ 479b3e440bSWarner Losh libcompat \ 48a1c70d69SIan Lepore libcrypt \ 4964de8019SJohn Baldwin libdevctl \ 50ac4c695aSEd Maste libdevdctl \ 519b3e440bSWarner Losh libdevinfo \ 529b3e440bSWarner Losh libdevstat \ 537c807d77SEd Maste libdl \ 549b3e440bSWarner Losh libdwarf \ 559b3e440bSWarner Losh libedit \ 565f8eed2fSEd Maste libelftc \ 57c5ea81f7SEd Maste libevent1 \ 584b1fb8ffSEd Maste libexecinfo \ 599b3e440bSWarner Losh libexpat \ 609b3e440bSWarner Losh libfetch \ 61c4501804SEd Maste libgcc_eh \ 62c4501804SEd Maste libgcc_s \ 639b3e440bSWarner Losh libgeom \ 64ec214349SKristof Provost libifconfig \ 659b3e440bSWarner Losh libipsec \ 6663783933SJohn Baldwin libiscsiutil \ 679b3e440bSWarner Losh libjail \ 689b3e440bSWarner Losh libkiconv \ 69968bcca2SKa Ho Ng libkldelf \ 70a1c70d69SIan Lepore libkvm \ 71564b9ff2SBrooks Davis liblua \ 7281ad8388SMartin Matuska liblzma \ 739b3e440bSWarner Losh libmemstat \ 74a1c70d69SIan Lepore libmd \ 75903873ceSHans Petter Selasky libmixer \ 7643518607SKenneth D. Merry libmt \ 77127be1a7SAdrian Chadd lib80211 \ 786bea8766SBrooks Davis libnetbsd \ 795c4f8d80SVincenzo Maffione libnetmap \ 80a1c70d69SIan Lepore libnv \ 812da066efSJohn Baldwin libnvmf \ 82a36eca08SCraig Rodrigues libopenbsd \ 839b3e440bSWarner Losh libpam \ 8482fcadcdSBryan Drewery libpathconv \ 85f39bffc6SKonstantin Belousov libpcap \ 86a1c70d69SIan Lepore libpjdlog \ 87feb2ecc3SWarner Losh libproc \ 880daf62d9SStanislav Sedov libprocstat \ 89b37f6c98SKyle Evans libregex \ 90a1c70d69SIan Lepore librpcsvc \ 9135c05a4fSAdrian Chadd librss \ 929b3e440bSWarner Losh librt \ 93feb2ecc3SWarner Losh librtld_db \ 94a1c70d69SIan Lepore libsbuf \ 9591ee3463SIan Lepore libsmb \ 966486b015SJeremie Le Hen libstdbuf \ 97fc6f0665SEd Schouten libstdthreads \ 98d6fb4894SJohn Baldwin libsysdecode \ 99a1c70d69SIan Lepore libtacplus \ 100123ae304SKyle Evans libthr \ 1019b3e440bSWarner Losh libthread_db \ 1024ca4d6a8SBaptiste Daroussin libucl \ 1039b3e440bSWarner Losh libufs \ 1049b3e440bSWarner Losh libugidfw \ 1059b3e440bSWarner Losh libulog \ 106a1c70d69SIan Lepore libutil \ 1079b3e440bSWarner Losh ${_libvgl} \ 1089b3e440bSWarner Losh libwrap \ 109d7790611SMarcel Moolenaar libxo \ 1109b3e440bSWarner Losh liby \ 1119b3e440bSWarner Losh libz \ 112e2290905SBaptiste Daroussin libzstd \ 1136c5cdba1SDag-Erling Smørgrav ncurses \ 1146c5cdba1SDag-Erling Smørgrav nss_tacplus 11558f0484fSRodney W. Grimes 116a1c70d69SIan Lepore# Inter-library dependencies. When the makefile for a library contains LDADD 117a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here. 118a1c70d69SIan Lepore 119e4b0a90eSBrooks DavisSUBDIR_DEPEND_geom= libufs 120eb578fecSKyle EvansSUBDIR_DEPEND_googletest= libregex 121d567f909SBaptiste DaroussinSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd 122a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm 1235abafe4aSBaptiste DaroussinSUBDIR_DEPEND_libbsddialog= ncurses 124a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 125468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt 126cd0d51baSKyle Evans# libssp_nonshared doesn't need to be linked into libc on every arch, but it is 127cd0d51baSKyle Evans# small enough to build that this bit of serialization is likely insignificant. 1280d4f7723SBrooks DavisSUBDIR_DEPEND_libc= libsys libcompiler_rt libssp_nonshared 129a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf 130c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv 131cb5e41b1SRobert ClauseckerSUBDIR_DEPEND_libcrypt= libmd 132a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm 1337fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 134a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses 135a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf 136bc53c94fSEnji CooperSUBDIR_DEPEND_librpcsec_gss= libgssapi 137a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz 138a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm 1390aa27001SDag-Erling SmørgravSUBDIR_DEPEND_libpam= libcrypt ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 140a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil 141a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil 142a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd 143a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv 144e9d96105SBrooks Davis# See comment above about libssp_nonshared 145e9d96105SBrooks DavisSUBDIR_DEPEND_libsys= libcompiler_rt libssp_nonshared 146b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd 147a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd 148a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns} 149123ae304SKyle EvansSUBDIR_DEPEND_liblzma= libthr 150f39bffc6SKonstantin Belousov.if ${MK_OFED} != "no" 151f39bffc6SKonstantin BelousovSUBDIR_DEPEND_libpcap= ofed 152f39bffc6SKonstantin Belousov.endif 1536c5cdba1SDag-Erling SmørgravSUBDIR_DEPEND_nss_tacplus= libtacplus 154a1c70d69SIan Lepore 155690f477dSSam Leffler# NB: keep these sorted by MK_* knobs 156690f477dSSam Leffler 157a92958dfSSimon J. GerratySUBDIR.${MK_BEARSSL}+= libbearssl libsecureboot 158cd060b8dSEd MasteSUBDIR.${MK_BLACKLIST}+=libblacklist 159cd060b8dSEd MasteSUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp 160cd060b8dSEd MasteSUBDIR.${MK_BSNMP}+= libbsnmp 161cd060b8dSEd Maste 1623864bd4fSJessica Clarke.if !defined(COMPAT_LIBCOMPAT) 163021385abSAlex Richardson.if ${MK_CLANG} != "no" || ${MK_LLD} != "no" || \ 164021385abSAlex Richardson ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no" 165021385abSAlex RichardsonSUBDIR+= clang 166021385abSAlex Richardson.endif 1675e1847b4SPoul-Henning Kamp.endif 1685e1847b4SPoul-Henning Kamp 169cd060b8dSEd MasteSUBDIR.${MK_CUSE}+= libcuse 1705f8eed2fSEd MasteSUBDIR.${MK_TOOLCHAIN}+=libpe 17115d781b5SEmmanuel VadotSUBDIR.${MK_DIALOG}+= libdpv libfigpar 172f29af861SMark JohnstonSUBDIR.${MK_FDT}+= libfdt 173cd060b8dSEd MasteSUBDIR.${MK_FILE}+= libmagic 174cd060b8dSEd MasteSUBDIR.${MK_GPIO}+= libgpio 175cd060b8dSEd MasteSUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss 176cd060b8dSEd MasteSUBDIR.${MK_ICONV}+= libiconv_modules 177cd060b8dSEd MasteSUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err 178cd060b8dSEd MasteSUBDIR.${MK_LDNS}+= libldns 1791a13f2e6SEdward Tomasz NapieralaSUBDIR.${MK_STATS}+= libstats 1807b5038d7SDag-Erling Smørgrav 181ac4c695aSEd Maste# The libraries under libclang_rt can only be built by clang. 182514773a5SDimitry Andric.if ${COMPILER_TYPE} == "clang" && ${MK_CLANG} != "no" 1838028b78dSDimitry Andric_libclang_rt= libclang_rt 1842a31cd21SEd Maste.elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all) 1856f6fbfa3SEd Maste.error Requested build with sanitizers but cannot build runtime libraries! 1868028b78dSDimitry Andric.endif 1878028b78dSDimitry Andric 188cd060b8dSEd MasteSUBDIR.${MK_EFI}+= libefivar 18943e25f47SEnji CooperSUBDIR.${MK_GOOGLETEST}+= googletest 190cd060b8dSEd MasteSUBDIR.${MK_NETGRAPH}+= libnetgraph 191cd060b8dSEd MasteSUBDIR.${MK_NIS}+= libypclnt 192690f477dSSam Leffler 19325faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 194c9811e98SBruce Evans_libvgl= libvgl 195abbb0b30SMarcel Moolenaar.endif 196abbb0b30SMarcel Moolenaar 197cde6fa28SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64" 198cde6fa28SRuslan BukinSUBDIR.${MK_PMC}+= libopencsd 199cde6fa28SRuslan Bukin.endif 200cde6fa28SRuslan Bukin 20170d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64" 20230b3274fSRuslan BukinSUBDIR.${MK_PMC}+= libipt 20311c79f9eSMark Johnston.endif 20411c79f9eSMark Johnston 205*7ab1a32cSRuslan Bukin.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" || \ 206*7ab1a32cSRuslan Bukin ${MACHINE_CPUARCH} == "riscv" 207cd060b8dSEd MasteSUBDIR.${MK_BHYVE}+= libvmmapi 20802629e46SEnji Cooper.endif 20970d8f36aSPeter Grehan 210a1b67573SMike Karels.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" 211b0840a28SDimitry AndricSUBDIR.${MK_OPENMP}+= libomp 2126b3555c3SDimitry Andric.endif 2136adfb815SJessica Clarke.if ${MK_USB} != "no" 2147b1e19adSEd MasteSUBDIR.${MK_OPENSSH}+= libcbor libfido2 2152e85df65SEd Maste.endif 216cd060b8dSEd MasteSUBDIR.${MK_OPENSSL}+= libmp 2170d71f9f3SKristof ProvostSUBDIR.${MK_PF}+= libpfctl 218bc82609aSKyle EvansSUBDIR.${MK_PMC}+= libpmc libpmcstat 219cd060b8dSEd MasteSUBDIR.${MK_RADIUS_SUPPORT}+= libradius 220cd060b8dSEd MasteSUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil 221cd060b8dSEd MasteSUBDIR.${MK_TELNET}+= libtelnet 222cd060b8dSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+= atf 223ac4c695aSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+= liblutok 224cd060b8dSEd MasteSUBDIR.${MK_TESTS}+= tests 225cd060b8dSEd MasteSUBDIR.${MK_UNBOUND}+= libunbound 226cd060b8dSEd MasteSUBDIR.${MK_USB}+= libusbhid libusb 227f39bffc6SKonstantin BelousovSUBDIR.${MK_OFED}+= ofed 228a92958dfSSimon J. GerratySUBDIR.${MK_VERIEXEC}+= libveriexec 2297920ad94SKyle EvansSUBDIR.${MK_ZFS}+= libbe 230a8ec1b48SMaxim Sobolev 23154ff5d73SDimitry Andric.if !make(install) 23254ff5d73SDimitry AndricSUBDIR_PARALLEL= 23354ff5d73SDimitry Andric.endif 23454ff5d73SDimitry Andric 23558f0484fSRodney W. Grimes.include <bsd.subdir.mk> 236