158f0484fSRodney W. Grimes# @(#)Makefile 8.1 (Berkeley) 6/4/93 27f3dea24SPeter Wemm# $FreeBSD$ 3c9811e98SBruce Evans 4c6063d0dSWarner Losh.include <src.opts.mk> 5e1fe3dbaSRuslan Ermilov 6a1c70d69SIan Lepore# The SUBDIR_ORDERED 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 114d372549SEd MasteSUBDIR_ORDERED= csu \ 12b8fffe16SWarner Losh .WAIT \ 139b3e440bSWarner Losh libc \ 14091b8336SPeter Wemm libc_nonshared \ 1539cd938cSEd Schouten libcompiler_rt \ 168028b78dSDimitry Andric ${_libclang_rt} \ 17a1c70d69SIan Lepore ${_libcplusplus} \ 1849c8e5e7SDimitry Andric ${_libcxxrt} \ 19a1c70d69SIan Lepore libelf \ 20a1c70d69SIan Lepore msun 219b3e440bSWarner Losh 22a1c70d69SIan Lepore# The main list; please keep these sorted alphabetically. 230e46933cSStanislav Sedov 249b3e440bSWarner LoshSUBDIR= ${SUBDIR_ORDERED} \ 25b8fffe16SWarner Losh .WAIT \ 269b3e440bSWarner Losh libalias \ 279b3e440bSWarner Losh libarchive \ 289b3e440bSWarner Losh ${_libatm} \ 29a1c70d69SIan Lepore libauditd \ 309b3e440bSWarner Losh libbegemot \ 3139cd938cSEd Schouten libblocksruntime \ 329b3e440bSWarner Losh ${_libbluetooth} \ 339b3e440bSWarner Losh ${_libbsnmp} \ 3481bd3d89SAdrian Chadd libbsdstat \ 35a1c70d69SIan Lepore libbsm \ 369b3e440bSWarner Losh libbz2 \ 379b3e440bSWarner Losh libcalendar \ 389b3e440bSWarner Losh libcam \ 3942a85952SPawel Jakub Dawidek ${_libcasper} \ 40a1c70d69SIan Lepore ${_libcom_err} \ 419b3e440bSWarner Losh libcompat \ 42a1c70d69SIan Lepore libcrypt \ 4364de8019SJohn Baldwin libdevctl \ 449b3e440bSWarner Losh libdevinfo \ 459b3e440bSWarner Losh libdevstat \ 467fc89952SDevin Teske libdpv \ 479b3e440bSWarner Losh libdwarf \ 489b3e440bSWarner Losh libedit \ 4931942939SEd Maste ${_libelftc} \ 500d9e60c8SBryan Drewery libevent \ 514b1fb8ffSEd Maste libexecinfo \ 529b3e440bSWarner Losh libexpat \ 539b3e440bSWarner Losh libfetch \ 54041394f3SDevin Teske libfigpar \ 559b3e440bSWarner Losh libgeom \ 563b09bf5eSEnji Cooper ${_libgpio} \ 579b3e440bSWarner Losh ${_libgssapi} \ 589b3e440bSWarner Losh ${_librpcsec_gss} \ 59a1c70d69SIan Lepore ${_libiconv_modules} \ 609b3e440bSWarner Losh libipsec \ 619b3e440bSWarner Losh libjail \ 629b3e440bSWarner Losh libkiconv \ 63a1c70d69SIan Lepore libkvm \ 64a1c70d69SIan Lepore ${_libldns} \ 6581ad8388SMartin Matuska liblzma \ 66c7b6816fSEnji Cooper ${_libmagic} \ 679b3e440bSWarner Losh libmemstat \ 68a1c70d69SIan Lepore libmd \ 699b3e440bSWarner Losh ${_libmilter} \ 709b3e440bSWarner Losh ${_libmp} \ 7143518607SKenneth D. Merry libmt \ 727f725bcdSGrzegorz Bernacki ${_libnandfs} \ 73127be1a7SAdrian Chadd lib80211 \ 746bea8766SBrooks Davis libnetbsd \ 75a1c70d69SIan Lepore ${_libnetgraph} \ 769b3e440bSWarner Losh ${_libngatm} \ 77a1c70d69SIan Lepore libnv \ 78a36eca08SCraig Rodrigues libopenbsd \ 799b3e440bSWarner Losh libopie \ 809b3e440bSWarner Losh libpam \ 819b3e440bSWarner Losh libpcap \ 82c1da2974SEd Maste ${_libpe} \ 83a1c70d69SIan Lepore libpjdlog \ 849b3e440bSWarner Losh ${_libpmc} \ 8554bb94d7SRui Paulo ${_libproc} \ 860daf62d9SStanislav Sedov libprocstat \ 8731a741f4SEnji Cooper ${_libradius} \ 88a1c70d69SIan Lepore librpcsvc \ 899b3e440bSWarner Losh librt \ 90fb05b666SRui Paulo ${_librtld_db} \ 91a1c70d69SIan Lepore libsbuf \ 929b3e440bSWarner Losh ${_libsdp} \ 939b3e440bSWarner Losh ${_libsm} \ 9491ee3463SIan Lepore libsmb \ 959b3e440bSWarner Losh ${_libsmdb} \ 969b3e440bSWarner Losh ${_libsmutil} \ 97362492e5SBaptiste Daroussin libsqlite3 \ 989b3e440bSWarner Losh libstand \ 996486b015SJeremie Le Hen libstdbuf \ 100fc6f0665SEd Schouten libstdthreads \ 101d6fb4894SJohn Baldwin libsysdecode \ 102a1c70d69SIan Lepore libtacplus \ 1039b3e440bSWarner Losh ${_libtelnet} \ 1049b3e440bSWarner Losh ${_libthr} \ 1059b3e440bSWarner Losh libthread_db \ 1064ca4d6a8SBaptiste Daroussin libucl \ 1079b3e440bSWarner Losh libufs \ 1089b3e440bSWarner Losh libugidfw \ 1099b3e440bSWarner Losh libulog \ 1108f8790cdSDag-Erling Smørgrav ${_libunbound} \ 1119b3e440bSWarner Losh ${_libusbhid} \ 1129b3e440bSWarner Losh ${_libusb} \ 113a1c70d69SIan Lepore libutil \ 1149b3e440bSWarner Losh ${_libvgl} \ 115366f6083SPeter Grehan ${_libvmmapi} \ 1169b3e440bSWarner Losh libwrap \ 117d7790611SMarcel Moolenaar libxo \ 1189b3e440bSWarner Losh liby \ 119a1c70d69SIan Lepore ${_libypclnt} \ 1209b3e440bSWarner Losh libz \ 121a1c70d69SIan Lepore ncurses \ 122c175365cSMarcel Moolenaar ${_atf} \ 123cc21b86fSJulio Merino ${_clang} \ 12436716419SHans Petter Selasky ${_cuse} \ 125cc21b86fSJulio Merino ${_tests} 12658f0484fSRodney W. Grimes 127a1c70d69SIan Lepore# Inter-library dependencies. When the makefile for a library contains LDADD 128a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here. 129a1c70d69SIan Lepore 130a1c70d69SIan LeporeSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd 131a1c70d69SIan LeporeSUBDIR_DEPEND_libatm= libmd 132a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm 133a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 134468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt 135a1c70d69SIan LeporeSUBDIR_DEPEND_libc= libcompiler_rt 136a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf 137*c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv 138a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm 1397fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 140a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses 141a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf 142a1c70d69SIan LeporeSUBDIR_DEPEND_liblibrpcsec_gss= libgssapi 143a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz 144a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm 145a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd 14631a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 147a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil 148a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil 149a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd 150a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv 151a1c70d69SIan LeporeSUBDIR_DEPEND_libtacplus= libmd 152a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd 153a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns} 15453200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr} 155a1c70d69SIan Lepore 156690f477dSSam Leffler# NB: keep these sorted by MK_* knobs 157690f477dSSam Leffler 158e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no" 1599e9dbe04SHartmut Brandt_libngatm= libngatm 1605e1847b4SPoul-Henning Kamp.endif 1615e1847b4SPoul-Henning Kamp 162e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no" 1630986ab12SMaksim Yevmenkin_libbluetooth= libbluetooth 1640986ab12SMaksim Yevmenkin_libsdp= libsdp 16518d948adSMaksim Yevmenkin.endif 16623d1e148SMaksim Yevmenkin 167690f477dSSam Leffler.if ${MK_BSNMP} != "no" 168690f477dSSam Leffler_libbsnmp= libbsnmp 169690f477dSSam Leffler.endif 170690f477dSSam Leffler 17142a85952SPawel Jakub Dawidek.if ${MK_CASPER} != "no" 17242a85952SPawel Jakub Dawidek_libcasper= libcasper 17342a85952SPawel Jakub Dawidek.endif 17442a85952SPawel Jakub Dawidek 175bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) 1766513cfc8SRoman Divacky_clang= clang 1776513cfc8SRoman Divacky.endif 1786513cfc8SRoman Divacky 17936716419SHans Petter Selasky.if ${MK_CUSE} != "no" 18036716419SHans Petter Selasky_cuse= libcuse 18136716419SHans Petter Selasky.endif 18236716419SHans Petter Selasky 1831bc28ffcSEd Maste.if ${MK_TOOLCHAIN} != "no" 18431942939SEd Maste_libelftc= libelftc 185c1da2974SEd Maste_libpe= libpe 18631942939SEd Maste.endif 18731942939SEd Maste 188c7b6816fSEnji Cooper.if ${MK_FILE} != "no" 189c7b6816fSEnji Cooper_libmagic= libmagic 190c7b6816fSEnji Cooper.endif 191c7b6816fSEnji Cooper 1923b09bf5eSEnji Cooper.if ${MK_GPIO} != "no" 1933b09bf5eSEnji Cooper_libgpio= libgpio 1943b09bf5eSEnji Cooper.endif 1953b09bf5eSEnji Cooper 1966dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no" 1973fe21f77SDoug Barton_libgssapi= libgssapi 1988f55a568SDoug Rabson_librpcsec_gss= librpcsec_gss 1993fe21f77SDoug Barton.endif 2003fe21f77SDoug Barton 201ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no" 202ad30f8e7SGabor Kovesdan_libiconv_modules= libiconv_modules 203ad30f8e7SGabor Kovesdan.endif 204ad30f8e7SGabor Kovesdan 205a1c70d69SIan Lepore.if ${MK_KERBEROS_SUPPORT} != "no" 206a1c70d69SIan Lepore_libcom_err= libcom_err 207a1c70d69SIan Lepore.endif 208a1c70d69SIan Lepore 2097b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no" 2107b5038d7SDag-Erling Smørgrav_libldns= libldns 2117b5038d7SDag-Erling Smørgrav.endif 2127b5038d7SDag-Erling Smørgrav 2138028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make 2148028b78dSDimitry Andric# sense to build when clang is enabled at all. Furthermore, they can only be 2158028b78dSDimitry Andric# built for certain architectures. 2168028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ 217b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 218b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \ 219b78ee15eSRuslan Bukin (${MACHINE_CPUARCH} == "i386")) 2208028b78dSDimitry Andric_libclang_rt= libclang_rt 2218028b78dSDimitry Andric.endif 2228028b78dSDimitry Andric 22335e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no" 22435e370a2SDag-Erling Smørgrav_libcxxrt= libcxxrt 22535e370a2SDag-Erling Smørgrav_libcplusplus= libc++ 22635e370a2SDag-Erling Smørgrav.endif 22735e370a2SDag-Erling Smørgrav 228690f477dSSam Leffler.if ${MK_LIBTHR} != "no" 229690f477dSSam Leffler_libthr= libthr 230690f477dSSam Leffler.endif 231690f477dSSam Leffler 2327f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no" 2337f725bcdSGrzegorz Bernacki_libnandfs= libnandfs 2347f725bcdSGrzegorz Bernacki.endif 2357f725bcdSGrzegorz Bernacki 236690f477dSSam Leffler.if ${MK_NETGRAPH} != "no" 237690f477dSSam Leffler_libnetgraph= libnetgraph 238690f477dSSam Leffler.endif 239690f477dSSam Leffler 240690f477dSSam Leffler.if ${MK_NIS} != "no" 241690f477dSSam Leffler_libypclnt= libypclnt 242690f477dSSam Leffler.endif 243690f477dSSam Leffler 24425faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 245c9811e98SBruce Evans_libvgl= libvgl 24654bb94d7SRui Paulo_libproc= libproc 247fb05b666SRui Paulo_librtld_db= librtld_db 248abbb0b30SMarcel Moolenaar.endif 249abbb0b30SMarcel Moolenaar 25070d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64" 25102629e46SEnji Cooper.if ${MK_BHYVE} != "no" 25270d8f36aSPeter Grehan_libvmmapi= libvmmapi 25370d8f36aSPeter Grehan.endif 25402629e46SEnji Cooper.endif 25570d8f36aSPeter Grehan 25607d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips" 25707d39325SOleksandr Tymoshenko_libproc= libproc 25807d39325SOleksandr Tymoshenko_librtld_db= librtld_db 25907d39325SOleksandr Tymoshenko.endif 26007d39325SOleksandr Tymoshenko 261c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc" 262c7570492SJustin Hibbits_libproc= libproc 263c7570492SJustin Hibbits_librtld_db= librtld_db 264c7570492SJustin Hibbits.endif 265c7570492SJustin Hibbits 2665ac86464SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ 2675ac86464SRuslan Bukin ${MACHINE_CPUARCH} == "riscv" 268fcb56067SGeorge V. Neville-Neil_libproc= libproc 269fcb56067SGeorge V. Neville-Neil_librtld_db= librtld_db 270fcb56067SGeorge V. Neville-Neil.endif 271fcb56067SGeorge V. Neville-Neil 272690f477dSSam Leffler.if ${MK_OPENSSL} != "no" 273690f477dSSam Leffler_libmp= libmp 274690f477dSSam Leffler.endif 275690f477dSSam Leffler 276690f477dSSam Leffler.if ${MK_PMC} != "no" 277690f477dSSam Leffler_libpmc= libpmc 278690f477dSSam Leffler.endif 279690f477dSSam Leffler 28031a741f4SEnji Cooper.if ${MK_RADIUS_SUPPORT} != "no" 28131a741f4SEnji Cooper_libradius= libradius 28231a741f4SEnji Cooper.endif 28331a741f4SEnji Cooper 284690f477dSSam Leffler.if ${MK_SENDMAIL} != "no" 285690f477dSSam Leffler_libmilter= libmilter 286690f477dSSam Leffler_libsm= libsm 287690f477dSSam Leffler_libsmdb= libsmdb 288690f477dSSam Leffler_libsmutil= libsmutil 289690f477dSSam Leffler.endif 290690f477dSSam Leffler 291690f477dSSam Leffler.if ${MK_TELNET} != "no" 292690f477dSSam Leffler_libtelnet= libtelnet 293e9043a12SMike Makonnen.endif 294e9043a12SMike Makonnen 295b55e8e6eSWarner Losh.if ${MK_TESTS_SUPPORT} != "no" 296e01d128aSJulio Merino_atf= atf 297b55e8e6eSWarner Losh.endif 298b55e8e6eSWarner Losh.if ${MK_TESTS} != "no" 299cc21b86fSJulio Merino_tests= tests 300e01d128aSJulio Merino.endif 301e01d128aSJulio Merino 3028f8790cdSDag-Erling Smørgrav.if ${MK_UNBOUND} != "no" 3038f8790cdSDag-Erling Smørgrav_libunbound= libunbound 3048f8790cdSDag-Erling Smørgrav.endif 3058f8790cdSDag-Erling Smørgrav 306e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no" 307f3e5ff40SBruce Evans_libusbhid= libusbhid 3086df55934SAndrew Thompson_libusb= libusb 309a8ec1b48SMaxim Sobolev.endif 310a8ec1b48SMaxim Sobolev 31154ff5d73SDimitry Andric.if !make(install) 31254ff5d73SDimitry AndricSUBDIR_PARALLEL= 31354ff5d73SDimitry Andric.endif 31454ff5d73SDimitry Andric 31558f0484fSRodney W. Grimes.include <bsd.subdir.mk> 316