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 \ 21a1c70d69SIan Lepore msun 229b3e440bSWarner Losh 23a1c70d69SIan Lepore# The main list; please keep these sorted alphabetically. 240e46933cSStanislav Sedov 25fa6d79e8SBryan DrewerySUBDIR= ${SUBDIR_BOOTSTRAP} \ 26b8fffe16SWarner Losh .WAIT \ 279b3e440bSWarner Losh libalias \ 289b3e440bSWarner Losh libarchive \ 299b3e440bSWarner Losh ${_libatm} \ 30a1c70d69SIan Lepore libauditd \ 319b3e440bSWarner Losh libbegemot \ 3295856e14SKurt Lidl ${_libblacklist} \ 3339cd938cSEd Schouten libblocksruntime \ 349b3e440bSWarner Losh ${_libbluetooth} \ 359b3e440bSWarner Losh ${_libbsnmp} \ 3681bd3d89SAdrian Chadd libbsdstat \ 37a1c70d69SIan Lepore libbsm \ 389b3e440bSWarner Losh libbz2 \ 399b3e440bSWarner Losh libcalendar \ 409b3e440bSWarner Losh libcam \ 4142a85952SPawel Jakub Dawidek ${_libcasper} \ 42a1c70d69SIan Lepore ${_libcom_err} \ 439b3e440bSWarner Losh libcompat \ 44a1c70d69SIan Lepore libcrypt \ 4564de8019SJohn Baldwin libdevctl \ 46903b0dd7SEd Maste ${_libdevdctl} \ 479b3e440bSWarner Losh libdevinfo \ 489b3e440bSWarner Losh libdevstat \ 499b3e440bSWarner Losh libdwarf \ 509b3e440bSWarner Losh libedit \ 5131942939SEd Maste ${_libelftc} \ 520d9e60c8SBryan Drewery libevent \ 534b1fb8ffSEd Maste libexecinfo \ 549b3e440bSWarner Losh libexpat \ 559b3e440bSWarner Losh libfetch \ 56041394f3SDevin Teske libfigpar \ 579b3e440bSWarner Losh libgeom \ 583b09bf5eSEnji Cooper ${_libgpio} \ 599b3e440bSWarner Losh ${_libgssapi} \ 609b3e440bSWarner Losh ${_librpcsec_gss} \ 61a1c70d69SIan Lepore ${_libiconv_modules} \ 62ec214349SKristof Provost libifconfig \ 639b3e440bSWarner Losh libipsec \ 649b3e440bSWarner Losh libjail \ 659b3e440bSWarner Losh libkiconv \ 66a1c70d69SIan Lepore libkvm \ 67a1c70d69SIan Lepore ${_libldns} \ 6881ad8388SMartin Matuska liblzma \ 69c7b6816fSEnji Cooper ${_libmagic} \ 709b3e440bSWarner Losh libmemstat \ 71a1c70d69SIan Lepore libmd \ 729b3e440bSWarner Losh ${_libmilter} \ 739b3e440bSWarner Losh ${_libmp} \ 7443518607SKenneth D. Merry libmt \ 757f725bcdSGrzegorz Bernacki ${_libnandfs} \ 76127be1a7SAdrian Chadd lib80211 \ 776bea8766SBrooks Davis libnetbsd \ 78a1c70d69SIan Lepore ${_libnetgraph} \ 799b3e440bSWarner Losh ${_libngatm} \ 80a1c70d69SIan Lepore libnv \ 81a36eca08SCraig Rodrigues libopenbsd \ 829b3e440bSWarner Losh libopie \ 839b3e440bSWarner Losh libpam \ 849b3e440bSWarner Losh libpcap \ 85c1da2974SEd Maste ${_libpe} \ 86a1c70d69SIan Lepore libpjdlog \ 879b3e440bSWarner Losh ${_libpmc} \ 8854bb94d7SRui Paulo ${_libproc} \ 890daf62d9SStanislav Sedov libprocstat \ 9031a741f4SEnji Cooper ${_libradius} \ 91a1c70d69SIan Lepore librpcsvc \ 92*35c05a4fSAdrian Chadd librss \ 939b3e440bSWarner Losh librt \ 94fb05b666SRui Paulo ${_librtld_db} \ 95a1c70d69SIan Lepore libsbuf \ 969b3e440bSWarner Losh ${_libsdp} \ 979b3e440bSWarner Losh ${_libsm} \ 9891ee3463SIan Lepore libsmb \ 999b3e440bSWarner Losh ${_libsmdb} \ 1009b3e440bSWarner Losh ${_libsmutil} \ 101362492e5SBaptiste Daroussin libsqlite3 \ 1029b3e440bSWarner Losh libstand \ 1036486b015SJeremie Le Hen libstdbuf \ 104fc6f0665SEd Schouten libstdthreads \ 105d6fb4894SJohn Baldwin libsysdecode \ 106a1c70d69SIan Lepore libtacplus \ 1079b3e440bSWarner Losh ${_libtelnet} \ 1089b3e440bSWarner Losh ${_libthr} \ 1099b3e440bSWarner Losh libthread_db \ 1104ca4d6a8SBaptiste Daroussin libucl \ 1119b3e440bSWarner Losh libufs \ 1129b3e440bSWarner Losh libugidfw \ 1139b3e440bSWarner Losh libulog \ 1148f8790cdSDag-Erling Smørgrav ${_libunbound} \ 1159b3e440bSWarner Losh ${_libusbhid} \ 1169b3e440bSWarner Losh ${_libusb} \ 117a1c70d69SIan Lepore libutil \ 1189b3e440bSWarner Losh ${_libvgl} \ 119366f6083SPeter Grehan ${_libvmmapi} \ 1209b3e440bSWarner Losh libwrap \ 121d7790611SMarcel Moolenaar libxo \ 1229b3e440bSWarner Losh liby \ 123a1c70d69SIan Lepore ${_libypclnt} \ 1249b3e440bSWarner Losh libz \ 125a1c70d69SIan Lepore ncurses \ 126c175365cSMarcel Moolenaar ${_atf} \ 127cc21b86fSJulio Merino ${_clang} \ 12836716419SHans Petter Selasky ${_cuse} \ 129cc21b86fSJulio Merino ${_tests} 13058f0484fSRodney W. Grimes 131a1c70d69SIan Lepore# Inter-library dependencies. When the makefile for a library contains LDADD 132a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here. 133a1c70d69SIan Lepore 134a1c70d69SIan LeporeSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd 135a1c70d69SIan LeporeSUBDIR_DEPEND_libatm= libmd 136a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm 137a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 138468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt 139a1c70d69SIan LeporeSUBDIR_DEPEND_libc= libcompiler_rt 140a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf 141c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv 142a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm 1437fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 144a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses 145a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf 146a1c70d69SIan LeporeSUBDIR_DEPEND_liblibrpcsec_gss= libgssapi 147a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz 148a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm 149a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd 15031a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 151a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil 152a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil 153a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd 154a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv 155b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd 156a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd 157a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns} 15853200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr} 159a1c70d69SIan Lepore 160690f477dSSam Leffler# NB: keep these sorted by MK_* knobs 161690f477dSSam Leffler 162e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no" 1639e9dbe04SHartmut Brandt_libngatm= libngatm 1645e1847b4SPoul-Henning Kamp.endif 1655e1847b4SPoul-Henning Kamp 166c0759dacSKurt Lidl.if ${MK_BLACKLIST} != "no" 16795856e14SKurt Lidl_libblacklist= libblacklist 16895856e14SKurt Lidl.endif 16995856e14SKurt Lidl 170e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no" 1710986ab12SMaksim Yevmenkin_libbluetooth= libbluetooth 1720986ab12SMaksim Yevmenkin_libsdp= libsdp 17318d948adSMaksim Yevmenkin.endif 17423d1e148SMaksim Yevmenkin 175690f477dSSam Leffler.if ${MK_BSNMP} != "no" 176690f477dSSam Leffler_libbsnmp= libbsnmp 177690f477dSSam Leffler.endif 178690f477dSSam Leffler 17942a85952SPawel Jakub Dawidek.if ${MK_CASPER} != "no" 18042a85952SPawel Jakub Dawidek_libcasper= libcasper 18142a85952SPawel Jakub Dawidek.endif 18242a85952SPawel Jakub Dawidek 183bb52d711SWarner Losh.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) 1846513cfc8SRoman Divacky_clang= clang 1856513cfc8SRoman Divacky.endif 1866513cfc8SRoman Divacky 18736716419SHans Petter Selasky.if ${MK_CUSE} != "no" 18836716419SHans Petter Selasky_cuse= libcuse 18936716419SHans Petter Selasky.endif 19036716419SHans Petter Selasky 191903b0dd7SEd Maste.if ${MK_CXX} != "no" 192903b0dd7SEd Maste_libdevdctl= libdevdctl 193903b0dd7SEd Maste.endif 194903b0dd7SEd Maste 1951bc28ffcSEd Maste.if ${MK_TOOLCHAIN} != "no" 19631942939SEd Maste_libelftc= libelftc 197c1da2974SEd Maste_libpe= libpe 19831942939SEd Maste.endif 19931942939SEd Maste 200f987297fSEd MasteSUBDIR.${MK_DIALOG}+= libdpv 201f987297fSEd Maste 202c7b6816fSEnji Cooper.if ${MK_FILE} != "no" 203c7b6816fSEnji Cooper_libmagic= libmagic 204c7b6816fSEnji Cooper.endif 205c7b6816fSEnji Cooper 2063b09bf5eSEnji Cooper.if ${MK_GPIO} != "no" 2073b09bf5eSEnji Cooper_libgpio= libgpio 2083b09bf5eSEnji Cooper.endif 2093b09bf5eSEnji Cooper 2106dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no" 2113fe21f77SDoug Barton_libgssapi= libgssapi 2128f55a568SDoug Rabson_librpcsec_gss= librpcsec_gss 2133fe21f77SDoug Barton.endif 2143fe21f77SDoug Barton 215ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no" 216ad30f8e7SGabor Kovesdan_libiconv_modules= libiconv_modules 217ad30f8e7SGabor Kovesdan.endif 218ad30f8e7SGabor Kovesdan 219a1c70d69SIan Lepore.if ${MK_KERBEROS_SUPPORT} != "no" 220a1c70d69SIan Lepore_libcom_err= libcom_err 221a1c70d69SIan Lepore.endif 222a1c70d69SIan Lepore 2237b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no" 2247b5038d7SDag-Erling Smørgrav_libldns= libldns 2257b5038d7SDag-Erling Smørgrav.endif 2267b5038d7SDag-Erling Smørgrav 2278028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make 2288028b78dSDimitry Andric# sense to build when clang is enabled at all. Furthermore, they can only be 2298028b78dSDimitry Andric# built for certain architectures. 2308028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ 231b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 232b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \ 233b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "i386")) 2348028b78dSDimitry Andric_libclang_rt= libclang_rt 2358028b78dSDimitry Andric.endif 2368028b78dSDimitry Andric 23735e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no" 23835e370a2SDag-Erling Smørgrav_libcxxrt= libcxxrt 23935e370a2SDag-Erling Smørgrav_libcplusplus= libc++ 24035e370a2SDag-Erling Smørgrav.endif 24135e370a2SDag-Erling Smørgrav 242690f477dSSam Leffler.if ${MK_LIBTHR} != "no" 243690f477dSSam Leffler_libthr= libthr 244690f477dSSam Leffler.endif 245690f477dSSam Leffler 2467f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no" 2477f725bcdSGrzegorz Bernacki_libnandfs= libnandfs 2487f725bcdSGrzegorz Bernacki.endif 2497f725bcdSGrzegorz Bernacki 250690f477dSSam Leffler.if ${MK_NETGRAPH} != "no" 251690f477dSSam Leffler_libnetgraph= libnetgraph 252690f477dSSam Leffler.endif 253690f477dSSam Leffler 254690f477dSSam Leffler.if ${MK_NIS} != "no" 255690f477dSSam Leffler_libypclnt= libypclnt 256690f477dSSam Leffler.endif 257690f477dSSam Leffler 25825faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 259c9811e98SBruce Evans_libvgl= libvgl 26054bb94d7SRui Paulo_libproc= libproc 261fb05b666SRui Paulo_librtld_db= librtld_db 262abbb0b30SMarcel Moolenaar.endif 263abbb0b30SMarcel Moolenaar 26470d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64" 26502629e46SEnji Cooper.if ${MK_BHYVE} != "no" 26670d8f36aSPeter Grehan_libvmmapi= libvmmapi 26770d8f36aSPeter Grehan.endif 26802629e46SEnji Cooper.endif 26970d8f36aSPeter Grehan 27007d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips" 27107d39325SOleksandr Tymoshenko_libproc= libproc 27207d39325SOleksandr Tymoshenko_librtld_db= librtld_db 27307d39325SOleksandr Tymoshenko.endif 27407d39325SOleksandr Tymoshenko 275c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc" 276c7570492SJustin Hibbits_libproc= libproc 277c7570492SJustin Hibbits_librtld_db= librtld_db 278c7570492SJustin Hibbits.endif 279c7570492SJustin Hibbits 2805ac86464SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ 2815ac86464SRuslan Bukin ${MACHINE_CPUARCH} == "riscv" 282fcb56067SGeorge V. Neville-Neil_libproc= libproc 283fcb56067SGeorge V. Neville-Neil_librtld_db= librtld_db 284fcb56067SGeorge V. Neville-Neil.endif 285fcb56067SGeorge V. Neville-Neil 286690f477dSSam Leffler.if ${MK_OPENSSL} != "no" 287690f477dSSam Leffler_libmp= libmp 288690f477dSSam Leffler.endif 289690f477dSSam Leffler 290690f477dSSam Leffler.if ${MK_PMC} != "no" 291690f477dSSam Leffler_libpmc= libpmc 292690f477dSSam Leffler.endif 293690f477dSSam Leffler 29431a741f4SEnji Cooper.if ${MK_RADIUS_SUPPORT} != "no" 29531a741f4SEnji Cooper_libradius= libradius 29631a741f4SEnji Cooper.endif 29731a741f4SEnji Cooper 298690f477dSSam Leffler.if ${MK_SENDMAIL} != "no" 299690f477dSSam Leffler_libmilter= libmilter 300690f477dSSam Leffler_libsm= libsm 301690f477dSSam Leffler_libsmdb= libsmdb 302690f477dSSam Leffler_libsmutil= libsmutil 303690f477dSSam Leffler.endif 304690f477dSSam Leffler 305690f477dSSam Leffler.if ${MK_TELNET} != "no" 306690f477dSSam Leffler_libtelnet= libtelnet 307e9043a12SMike Makonnen.endif 308e9043a12SMike Makonnen 309b55e8e6eSWarner Losh.if ${MK_TESTS_SUPPORT} != "no" 310e01d128aSJulio Merino_atf= atf 311b55e8e6eSWarner Losh.endif 312b55e8e6eSWarner Losh.if ${MK_TESTS} != "no" 313cc21b86fSJulio Merino_tests= tests 314e01d128aSJulio Merino.endif 315e01d128aSJulio Merino 3168f8790cdSDag-Erling Smørgrav.if ${MK_UNBOUND} != "no" 3178f8790cdSDag-Erling Smørgrav_libunbound= libunbound 3188f8790cdSDag-Erling Smørgrav.endif 3198f8790cdSDag-Erling Smørgrav 320e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no" 321f3e5ff40SBruce Evans_libusbhid= libusbhid 3226df55934SAndrew Thompson_libusb= libusb 323a8ec1b48SMaxim Sobolev.endif 324a8ec1b48SMaxim Sobolev 32554ff5d73SDimitry Andric.if !make(install) 32654ff5d73SDimitry AndricSUBDIR_PARALLEL= 32754ff5d73SDimitry Andric.endif 32854ff5d73SDimitry Andric 32958f0484fSRodney W. Grimes.include <bsd.subdir.mk> 330