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 119b3e440bSWarner LoshSUBDIR_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 \ 39a1c70d69SIan Lepore ${_libcapsicum} \ 4042a85952SPawel Jakub Dawidek ${_libcasper} \ 41a1c70d69SIan Lepore ${_libcom_err} \ 429b3e440bSWarner Losh libcompat \ 43a1c70d69SIan Lepore libcrypt \ 4464de8019SJohn Baldwin libdevctl \ 459b3e440bSWarner Losh libdevinfo \ 469b3e440bSWarner Losh libdevstat \ 477fc89952SDevin Teske libdpv \ 489b3e440bSWarner Losh libdwarf \ 499b3e440bSWarner Losh libedit \ 5031942939SEd Maste ${_libelftc} \ 51f9721976SXin LI ${_libevent} \ 524b1fb8ffSEd Maste libexecinfo \ 539b3e440bSWarner Losh libexpat \ 549b3e440bSWarner Losh libfetch \ 55041394f3SDevin Teske libfigpar \ 569b3e440bSWarner Losh libgeom \ 573b09bf5eSEnji Cooper ${_libgpio} \ 589b3e440bSWarner Losh ${_libgssapi} \ 599b3e440bSWarner Losh ${_librpcsec_gss} \ 60a1c70d69SIan Lepore ${_libiconv_modules} \ 619b3e440bSWarner Losh libipsec \ 629b3e440bSWarner Losh libjail \ 639b3e440bSWarner Losh libkiconv \ 64a1c70d69SIan Lepore libkvm \ 65a1c70d69SIan Lepore ${_libldns} \ 6681ad8388SMartin Matuska liblzma \ 67c7b6816fSEnji Cooper ${_libmagic} \ 68cc4842a1SUlrich Spörlein libmandoc \ 699b3e440bSWarner Losh libmemstat \ 70a1c70d69SIan Lepore libmd \ 719b3e440bSWarner Losh ${_libmilter} \ 729b3e440bSWarner Losh ${_libmp} \ 737f725bcdSGrzegorz Bernacki ${_libnandfs} \ 746bea8766SBrooks Davis libnetbsd \ 75a1c70d69SIan Lepore ${_libnetgraph} \ 769b3e440bSWarner Losh ${_libngatm} \ 77a1c70d69SIan Lepore libnv \ 78e806d508SBaptiste Daroussin libohash \ 799b3e440bSWarner Losh libopie \ 809b3e440bSWarner Losh libpam \ 819b3e440bSWarner Losh libpcap \ 82a1c70d69SIan Lepore libpjdlog \ 839b3e440bSWarner Losh ${_libpmc} \ 8454bb94d7SRui Paulo ${_libproc} \ 850daf62d9SStanislav Sedov libprocstat \ 8631a741f4SEnji Cooper ${_libradius} \ 87a1c70d69SIan Lepore librpcsvc \ 889b3e440bSWarner Losh librt \ 89fb05b666SRui Paulo ${_librtld_db} \ 90a1c70d69SIan Lepore libsbuf \ 919b3e440bSWarner Losh ${_libsdp} \ 929b3e440bSWarner Losh ${_libsm} \ 93237abf0cSDavide Italiano ${_libsmb} \ 949b3e440bSWarner Losh ${_libsmdb} \ 959b3e440bSWarner Losh ${_libsmutil} \ 96362492e5SBaptiste Daroussin libsqlite3 \ 979b3e440bSWarner Losh libstand \ 986486b015SJeremie Le Hen libstdbuf \ 99fc6f0665SEd Schouten libstdthreads \ 100a1c70d69SIan Lepore libtacplus \ 1019b3e440bSWarner Losh ${_libtelnet} \ 1029b3e440bSWarner Losh ${_libthr} \ 1039b3e440bSWarner Losh libthread_db \ 1044ca4d6a8SBaptiste Daroussin libucl \ 1059b3e440bSWarner Losh libufs \ 1069b3e440bSWarner Losh libugidfw \ 1079b3e440bSWarner Losh libulog \ 1088f8790cdSDag-Erling Smørgrav ${_libunbound} \ 1099b3e440bSWarner Losh ${_libusbhid} \ 1109b3e440bSWarner Losh ${_libusb} \ 111a1c70d69SIan Lepore libutil \ 1129b3e440bSWarner Losh ${_libvgl} \ 113366f6083SPeter Grehan ${_libvmmapi} \ 1149b3e440bSWarner Losh libwrap \ 115d7790611SMarcel Moolenaar libxo \ 1169b3e440bSWarner Losh liby \ 117a1c70d69SIan Lepore ${_libypclnt} \ 1189b3e440bSWarner Losh libz \ 119a1c70d69SIan Lepore ncurses \ 120c175365cSMarcel Moolenaar ${_atf} \ 121cc21b86fSJulio Merino ${_clang} \ 12236716419SHans Petter Selasky ${_cuse} \ 123cc21b86fSJulio Merino ${_tests} 12458f0484fSRodney W. Grimes 125a1c70d69SIan Lepore# Inter-library dependencies. When the makefile for a library contains LDADD 126a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here. 127a1c70d69SIan Lepore 128a1c70d69SIan LeporeSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd 129a1c70d69SIan LeporeSUBDIR_DEPEND_libatm= libmd 130a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm 131a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 132a1c70d69SIan LeporeSUBDIR_DEPEND_libc++= libcxxrt 133a1c70d69SIan LeporeSUBDIR_DEPEND_libc= libcompiler_rt 134a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf 135a1c70d69SIan LeporeSUBDIR_DEPEND_libcapsicum= libnv 136a1c70d69SIan LeporeSUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog 137a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm 1387fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 139a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses 140a1c70d69SIan LeporeSUBDIR_DEPEND_libg++= msun 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_libreadline= ncurses 151a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv 152a1c70d69SIan LeporeSUBDIR_DEPEND_libstdc++= msun 153a1c70d69SIan LeporeSUBDIR_DEPEND_libtacplus= libmd 154a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd 155a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns} 156*53200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr} 157a1c70d69SIan Lepore 1582bef81cfSWarner Losh.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) 1592bef81cfSWarner Losh_csu=csu/${MACHINE_ARCH}-elf 160b12277d1SNathan Whitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}) 161b12277d1SNathan Whitehorn_csu=csu/${MACHINE_ARCH} 16225faff34SWarner Losh.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile) 16325faff34SWarner Losh_csu=csu/${MACHINE_CPUARCH} 16456a91a6fSDavid E. O'Brien.else 16556a91a6fSDavid E. O'Brien_csu=csu 166b09f41a4SJohn Birrell.endif 167b09f41a4SJohn Birrell 168690f477dSSam Leffler# NB: keep these sorted by MK_* knobs 169690f477dSSam Leffler 170e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no" 1719e9dbe04SHartmut Brandt_libngatm= libngatm 1725e1847b4SPoul-Henning Kamp.endif 1735e1847b4SPoul-Henning Kamp 174e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no" 1750986ab12SMaksim Yevmenkin_libbluetooth= libbluetooth 1760986ab12SMaksim Yevmenkin_libsdp= libsdp 17718d948adSMaksim Yevmenkin.endif 17823d1e148SMaksim Yevmenkin 179690f477dSSam Leffler.if ${MK_BSNMP} != "no" 180690f477dSSam Leffler_libbsnmp= libbsnmp 181690f477dSSam Leffler.endif 182690f477dSSam Leffler 18342a85952SPawel Jakub Dawidek.if ${MK_CASPER} != "no" 18442a85952SPawel Jakub Dawidek_libcapsicum= libcapsicum 18542a85952SPawel Jakub Dawidek_libcasper= libcasper 18642a85952SPawel Jakub Dawidek.endif 18742a85952SPawel Jakub Dawidek 188bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) 1896513cfc8SRoman Divacky_clang= clang 1906513cfc8SRoman Divacky.endif 1916513cfc8SRoman Divacky 19236716419SHans Petter Selasky.if ${MK_CUSE} != "no" 19336716419SHans Petter Selasky_cuse= libcuse 19436716419SHans Petter Selasky.endif 19536716419SHans Petter Selasky 19631942939SEd Maste.if ${MK_ELFTOOLCHAIN_TOOLS} != "no" 19731942939SEd Maste_libelftc= libelftc 19831942939SEd Maste.endif 19931942939SEd Maste 200c7b6816fSEnji Cooper.if ${MK_FILE} != "no" 201c7b6816fSEnji Cooper_libmagic= libmagic 202c7b6816fSEnji Cooper.endif 203c7b6816fSEnji Cooper 2043b09bf5eSEnji Cooper.if ${MK_GPIO} != "no" 2053b09bf5eSEnji Cooper_libgpio= libgpio 2063b09bf5eSEnji Cooper.endif 2073b09bf5eSEnji Cooper 2086dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no" 2093fe21f77SDoug Barton_libgssapi= libgssapi 2108f55a568SDoug Rabson_librpcsec_gss= librpcsec_gss 2113fe21f77SDoug Barton.endif 2123fe21f77SDoug Barton 213ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no" 214ad30f8e7SGabor Kovesdan_libiconv_modules= libiconv_modules 215ad30f8e7SGabor Kovesdan.endif 216ad30f8e7SGabor Kovesdan 217a1c70d69SIan Lepore.if ${MK_KERBEROS_SUPPORT} != "no" 218a1c70d69SIan Lepore_libcom_err= libcom_err 219a1c70d69SIan Lepore.endif 220a1c70d69SIan Lepore 2217b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no" 2227b5038d7SDag-Erling Smørgrav_libldns= libldns 2237b5038d7SDag-Erling Smørgrav.endif 2247b5038d7SDag-Erling Smørgrav 2258028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make 2268028b78dSDimitry Andric# sense to build when clang is enabled at all. Furthermore, they can only be 2278028b78dSDimitry Andric# built for certain architectures. 2288028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ 2298028b78dSDimitry Andric (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ 2308028b78dSDimitry Andric (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb")) 2318028b78dSDimitry Andric_libclang_rt= libclang_rt 2328028b78dSDimitry Andric.endif 2338028b78dSDimitry Andric 23435e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no" 23535e370a2SDag-Erling Smørgrav_libcxxrt= libcxxrt 23635e370a2SDag-Erling Smørgrav_libcplusplus= libc++ 23735e370a2SDag-Erling Smørgrav.endif 23835e370a2SDag-Erling Smørgrav 239690f477dSSam Leffler.if ${MK_LIBTHR} != "no" 240690f477dSSam Leffler_libthr= libthr 241690f477dSSam Leffler.endif 242690f477dSSam Leffler 2437f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no" 2447f725bcdSGrzegorz Bernacki_libnandfs= libnandfs 2457f725bcdSGrzegorz Bernacki.endif 2467f725bcdSGrzegorz Bernacki 247690f477dSSam Leffler.if ${MK_NETGRAPH} != "no" 248690f477dSSam Leffler_libnetgraph= libnetgraph 249690f477dSSam Leffler.endif 250690f477dSSam Leffler 251690f477dSSam Leffler.if ${MK_NIS} != "no" 252690f477dSSam Leffler_libypclnt= libypclnt 253690f477dSSam Leffler.endif 254690f477dSSam Leffler 255f9721976SXin LI.if ${MK_PF} != "no" 256f9721976SXin LI_libevent= libevent 257f9721976SXin LI.endif 258f9721976SXin LI 25925faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 260237abf0cSDavide Italiano_libsmb= libsmb 261c9811e98SBruce Evans_libvgl= libvgl 26254bb94d7SRui Paulo_libproc= libproc 263fb05b666SRui Paulo_librtld_db= librtld_db 264abbb0b30SMarcel Moolenaar.endif 265abbb0b30SMarcel Moolenaar 26670d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64" 26702629e46SEnji Cooper.if ${MK_BHYVE} != "no" 26870d8f36aSPeter Grehan_libvmmapi= libvmmapi 26970d8f36aSPeter Grehan.endif 27002629e46SEnji Cooper.endif 27170d8f36aSPeter Grehan 27207d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips" 27307d39325SOleksandr Tymoshenko_libproc= libproc 27407d39325SOleksandr Tymoshenko_librtld_db= librtld_db 27507d39325SOleksandr Tymoshenko.endif 27607d39325SOleksandr Tymoshenko 277c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc" 278c7570492SJustin Hibbits_libproc= libproc 279c7570492SJustin Hibbits_librtld_db= librtld_db 280237abf0cSDavide Italiano_libsmb= libsmb 281237abf0cSDavide Italiano.endif 282237abf0cSDavide Italiano 283237abf0cSDavide Italiano.if ${MACHINE_CPUARCH} == "sparc64" 284237abf0cSDavide Italiano_libsmb= libsmb 285c7570492SJustin Hibbits.endif 286c7570492SJustin Hibbits 287690f477dSSam Leffler.if ${MK_OPENSSL} != "no" 288690f477dSSam Leffler_libmp= libmp 289690f477dSSam Leffler.endif 290690f477dSSam Leffler 291690f477dSSam Leffler.if ${MK_PMC} != "no" 292690f477dSSam Leffler_libpmc= libpmc 293690f477dSSam Leffler.endif 294690f477dSSam Leffler 29531a741f4SEnji Cooper.if ${MK_RADIUS_SUPPORT} != "no" 29631a741f4SEnji Cooper_libradius= libradius 29731a741f4SEnji Cooper.endif 29831a741f4SEnji Cooper 299690f477dSSam Leffler.if ${MK_SENDMAIL} != "no" 300690f477dSSam Leffler_libmilter= libmilter 301690f477dSSam Leffler_libsm= libsm 302690f477dSSam Leffler_libsmdb= libsmdb 303690f477dSSam Leffler_libsmutil= libsmutil 304690f477dSSam Leffler.endif 305690f477dSSam Leffler 306690f477dSSam Leffler.if ${MK_TELNET} != "no" 307690f477dSSam Leffler_libtelnet= libtelnet 308e9043a12SMike Makonnen.endif 309e9043a12SMike Makonnen 310b55e8e6eSWarner Losh.if ${MK_TESTS_SUPPORT} != "no" 311e01d128aSJulio Merino_atf= atf 312b55e8e6eSWarner Losh.endif 313b55e8e6eSWarner Losh.if ${MK_TESTS} != "no" 314cc21b86fSJulio Merino_tests= tests 315e01d128aSJulio Merino.endif 316e01d128aSJulio Merino 3178f8790cdSDag-Erling Smørgrav.if ${MK_UNBOUND} != "no" 3188f8790cdSDag-Erling Smørgrav_libunbound= libunbound 3198f8790cdSDag-Erling Smørgrav.endif 3208f8790cdSDag-Erling Smørgrav 321e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no" 322f3e5ff40SBruce Evans_libusbhid= libusbhid 3236df55934SAndrew Thompson_libusb= libusb 324a8ec1b48SMaxim Sobolev.endif 325a8ec1b48SMaxim Sobolev 3267be23620SBrooks Davis.if !defined(LIBRARIES_ONLY) 3277c83e443STim Kientzleafterinstall: 3287be23620SBrooks Davis ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include 3297be23620SBrooks Davis.endif 3307c83e443STim Kientzle 33154ff5d73SDimitry Andric.if !make(install) 33254ff5d73SDimitry AndricSUBDIR_PARALLEL= 33354ff5d73SDimitry Andric.endif 33454ff5d73SDimitry Andric 33558f0484fSRodney W. Grimes.include <bsd.subdir.mk> 336