158f0484fSRodney W. Grimes# @(#)Makefile 8.1 (Berkeley) 6/4/93 27f3dea24SPeter Wemm# $FreeBSD$ 3c9811e98SBruce Evans 4c6063d0dSWarner Losh.include <src.opts.mk> 5e1fe3dbaSRuslan Ermilov 6fa6d79e8SBryan Drewery# The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many 7a1c70d69SIan Lepore# of the other libraries. These are built first with a .WAIT between them 8a1c70d69SIan Lepore# and the main list to avoid needing a SUBDIR_DEPEND line on every library 9a1c70d69SIan Lepore# naming just these few items. 10c9811e98SBruce Evans 11fa6d79e8SBryan DrewerySUBDIR_BOOTSTRAP= \ 12fa6d79e8SBryan Drewery csu \ 13b8fffe16SWarner Losh .WAIT \ 149b3e440bSWarner Losh libc \ 15091b8336SPeter Wemm libc_nonshared \ 1639cd938cSEd Schouten libcompiler_rt \ 178028b78dSDimitry Andric ${_libclang_rt} \ 18a1c70d69SIan Lepore ${_libcplusplus} \ 1949c8e5e7SDimitry Andric ${_libcxxrt} \ 20a1c70d69SIan Lepore libelf \ 21cd0d51baSKyle Evans libssp \ 22cd0d51baSKyle Evans libssp_nonshared \ 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 \ 3981bd3d89SAdrian Chadd libbsdstat \ 40a1c70d69SIan Lepore libbsm \ 419b3e440bSWarner Losh libbz2 \ 429b3e440bSWarner Losh libcalendar \ 439b3e440bSWarner Losh libcam \ 447a6e3cf8SMariusz Zaborski libcapsicum \ 45ceb36bc9SMariusz Zaborski libcasper \ 469b3e440bSWarner Losh libcompat \ 47a1c70d69SIan Lepore libcrypt \ 4864de8019SJohn Baldwin libdevctl \ 499b3e440bSWarner Losh libdevinfo \ 509b3e440bSWarner Losh libdevstat \ 517c807d77SEd Maste libdl \ 529b3e440bSWarner Losh libdwarf \ 539b3e440bSWarner Losh libedit \ 545f8eed2fSEd Maste libelftc \ 55c5ea81f7SEd Maste libevent1 \ 564b1fb8ffSEd Maste libexecinfo \ 579b3e440bSWarner Losh libexpat \ 589b3e440bSWarner Losh libfetch \ 59041394f3SDevin Teske libfigpar \ 60c4501804SEd Maste libgcc_eh \ 61c4501804SEd Maste libgcc_s \ 629b3e440bSWarner Losh libgeom \ 63ec214349SKristof Provost libifconfig \ 649b3e440bSWarner Losh libipsec \ 659b3e440bSWarner Losh libjail \ 669b3e440bSWarner Losh libkiconv \ 67a1c70d69SIan Lepore libkvm \ 68564b9ff2SBrooks Davis liblua \ 6981ad8388SMartin Matuska liblzma \ 709b3e440bSWarner Losh libmemstat \ 71a1c70d69SIan Lepore libmd \ 72903873ceSHans Petter Selasky libmixer \ 7343518607SKenneth D. Merry libmt \ 74127be1a7SAdrian Chadd lib80211 \ 756bea8766SBrooks Davis libnetbsd \ 765c4f8d80SVincenzo Maffione libnetmap \ 77a1c70d69SIan Lepore libnv \ 78a36eca08SCraig Rodrigues libopenbsd \ 799b3e440bSWarner Losh libopie \ 809b3e440bSWarner Losh libpam \ 8182fcadcdSBryan Drewery libpathconv \ 82f39bffc6SKonstantin Belousov libpcap \ 83a1c70d69SIan Lepore libpjdlog \ 84feb2ecc3SWarner Losh libproc \ 850daf62d9SStanislav Sedov libprocstat \ 86b37f6c98SKyle Evans libregex \ 87a1c70d69SIan Lepore librpcsvc \ 8835c05a4fSAdrian Chadd librss \ 899b3e440bSWarner Losh librt \ 90feb2ecc3SWarner Losh librtld_db \ 91a1c70d69SIan Lepore libsbuf \ 9291ee3463SIan Lepore libsmb \ 936486b015SJeremie Le Hen libstdbuf \ 94fc6f0665SEd Schouten libstdthreads \ 95d6fb4894SJohn Baldwin libsysdecode \ 96a1c70d69SIan Lepore libtacplus \ 97123ae304SKyle Evans libthr \ 989b3e440bSWarner Losh libthread_db \ 994ca4d6a8SBaptiste Daroussin libucl \ 1009b3e440bSWarner Losh libufs \ 1019b3e440bSWarner Losh libugidfw \ 1029b3e440bSWarner Losh libulog \ 103a1c70d69SIan Lepore libutil \ 1049b3e440bSWarner Losh ${_libvgl} \ 1059b3e440bSWarner Losh libwrap \ 106d7790611SMarcel Moolenaar libxo \ 1079b3e440bSWarner Losh liby \ 1089b3e440bSWarner Losh libz \ 109e2290905SBaptiste Daroussin libzstd \ 110cd060b8dSEd Maste ncurses 11158f0484fSRodney W. Grimes 112a1c70d69SIan Lepore# Inter-library dependencies. When the makefile for a library contains LDADD 113a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here. 114a1c70d69SIan Lepore 115e4b0a90eSBrooks DavisSUBDIR_DEPEND_geom= libufs 116eb578fecSKyle EvansSUBDIR_DEPEND_googletest= libregex 117d567f909SBaptiste DaroussinSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd 118a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm 119a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 120468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt 121cd0d51baSKyle Evans# libssp_nonshared doesn't need to be linked into libc on every arch, but it is 122cd0d51baSKyle Evans# small enough to build that this bit of serialization is likely insignificant. 123cd0d51baSKyle EvansSUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared 124a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf 125c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv 126a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm 1277fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 128a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses 129a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf 130bc53c94fSEnji CooperSUBDIR_DEPEND_librpcsec_gss= libgssapi 131a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz 132a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm 133a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd 13431a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 135a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil 136a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil 137a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd 138a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv 139b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd 140a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd 141a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns} 142123ae304SKyle EvansSUBDIR_DEPEND_liblzma= libthr 143f39bffc6SKonstantin Belousov.if ${MK_OFED} != "no" 144f39bffc6SKonstantin BelousovSUBDIR_DEPEND_libpcap= ofed 145f39bffc6SKonstantin Belousov.endif 146a1c70d69SIan Lepore 14773577bf0SRyan Moeller.if !defined(COMPAT_32BIT) 14873577bf0SRyan MoellerSUBDIR+= flua 14973577bf0SRyan MoellerSUBDIR_DEPEND_flua= libjail 15073577bf0SRyan Moeller.endif 15173577bf0SRyan Moeller 152690f477dSSam Leffler# NB: keep these sorted by MK_* knobs 153690f477dSSam Leffler 154cd060b8dSEd MasteSUBDIR.${MK_ATM}+= libngatm 155a92958dfSSimon J. GerratySUBDIR.${MK_BEARSSL}+= libbearssl libsecureboot 156cd060b8dSEd MasteSUBDIR.${MK_BLACKLIST}+=libblacklist 157cd060b8dSEd MasteSUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp 158cd060b8dSEd MasteSUBDIR.${MK_BSNMP}+= libbsnmp 159cd060b8dSEd Maste 160cd060b8dSEd Maste.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) 161021385abSAlex Richardson.if ${MK_CLANG} != "no" || ${MK_LLD} != "no" || \ 162021385abSAlex Richardson ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no" 163021385abSAlex RichardsonSUBDIR+= clang 164021385abSAlex Richardson.endif 1655e1847b4SPoul-Henning Kamp.endif 1665e1847b4SPoul-Henning Kamp 167cd060b8dSEd MasteSUBDIR.${MK_CUSE}+= libcuse 168cd060b8dSEd MasteSUBDIR.${MK_CXX}+= libdevdctl 1695f8eed2fSEd MasteSUBDIR.${MK_TOOLCHAIN}+=libpe 170f987297fSEd MasteSUBDIR.${MK_DIALOG}+= libdpv 171cd060b8dSEd MasteSUBDIR.${MK_FILE}+= libmagic 172cd060b8dSEd MasteSUBDIR.${MK_GPIO}+= libgpio 173cd060b8dSEd MasteSUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss 174cd060b8dSEd MasteSUBDIR.${MK_ICONV}+= libiconv_modules 175cd060b8dSEd MasteSUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err 176cd060b8dSEd MasteSUBDIR.${MK_LDNS}+= libldns 1771a13f2e6SEdward Tomasz NapieralaSUBDIR.${MK_STATS}+= libstats 1787b5038d7SDag-Erling Smørgrav 1798028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make 1808028b78dSDimitry Andric# sense to build when clang is enabled at all. Furthermore, they can only be 1818028b78dSDimitry Andric# built for certain architectures. 1827676b388SAlex Richardson.if ${COMPILER_TYPE} == "clang" && \ 183b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 1841bb8eb56SDimitry Andric ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \ 1851bb8eb56SDimitry Andric ${MACHINE_CPUARCH} == "powerpc") 1868028b78dSDimitry Andric_libclang_rt= libclang_rt 1877bc797e3SAlex Richardson.elif ${MK_ASAN} != "no" || ${MK_UBSAN} != "no" 1887bc797e3SAlex Richardson.error "Requested build with sanitizers but cannot build runtime libraries!" 1898028b78dSDimitry Andric.endif 1908028b78dSDimitry Andric 1915cf6f1c4SAlex Richardson.if ${MK_CXX} != "no" 19235e370a2SDag-Erling Smørgrav_libcxxrt= libcxxrt 1938e69077bSDimitry Andric_libcplusplus= libc++ 1948e69077bSDimitry Andric_libcplusplus+= libc++experimental 1958e69077bSDimitry Andric.endif 19635e370a2SDag-Erling Smørgrav 197cd060b8dSEd MasteSUBDIR.${MK_EFI}+= libefivar 19843e25f47SEnji CooperSUBDIR.${MK_GOOGLETEST}+= googletest 199cd060b8dSEd MasteSUBDIR.${MK_NETGRAPH}+= libnetgraph 200cd060b8dSEd MasteSUBDIR.${MK_NIS}+= libypclnt 201690f477dSSam Leffler 20225faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 203c9811e98SBruce Evans_libvgl= libvgl 204abbb0b30SMarcel Moolenaar.endif 205abbb0b30SMarcel Moolenaar 206cde6fa28SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64" 207cde6fa28SRuslan BukinSUBDIR.${MK_PMC}+= libopencsd 208cde6fa28SRuslan Bukin.endif 209cde6fa28SRuslan Bukin 21070d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64" 21130b3274fSRuslan BukinSUBDIR.${MK_PMC}+= libipt 212cd060b8dSEd MasteSUBDIR.${MK_BHYVE}+= libvmmapi 21302629e46SEnji Cooper.endif 21470d8f36aSPeter Grehan 2156b3555c3SDimitry Andric.if ${MACHINE_ARCH} != "powerpc" 216b0840a28SDimitry AndricSUBDIR.${MK_OPENMP}+= libomp 2176b3555c3SDimitry Andric.endif 2182e85df65SEd Maste.if !defined(COMPAT_32BIT) 219*7b1e19adSEd MasteSUBDIR.${MK_OPENSSH}+= libcbor libfido2 2202e85df65SEd Maste.endif 221cd060b8dSEd MasteSUBDIR.${MK_OPENSSL}+= libmp 2220d71f9f3SKristof ProvostSUBDIR.${MK_PF}+= libpfctl 223bc82609aSKyle EvansSUBDIR.${MK_PMC}+= libpmc libpmcstat 224cd060b8dSEd MasteSUBDIR.${MK_RADIUS_SUPPORT}+= libradius 225cd060b8dSEd MasteSUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil 226cd060b8dSEd MasteSUBDIR.${MK_TELNET}+= libtelnet 227cd060b8dSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+= atf 228c697fb7fSBrooks DavisSUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= liblutok 229cd060b8dSEd MasteSUBDIR.${MK_TESTS}+= tests 230cd060b8dSEd MasteSUBDIR.${MK_UNBOUND}+= libunbound 231cd060b8dSEd MasteSUBDIR.${MK_USB}+= libusbhid libusb 232f39bffc6SKonstantin BelousovSUBDIR.${MK_OFED}+= ofed 233a92958dfSSimon J. GerratySUBDIR.${MK_VERIEXEC}+= libveriexec 2347920ad94SKyle EvansSUBDIR.${MK_ZFS}+= libbe 235a8ec1b48SMaxim Sobolev 23654ff5d73SDimitry Andric.if !make(install) 23754ff5d73SDimitry AndricSUBDIR_PARALLEL= 23854ff5d73SDimitry Andric.endif 23954ff5d73SDimitry Andric 24058f0484fSRodney W. Grimes.include <bsd.subdir.mk> 241