1# $FreeBSD$ 2# 3# The include file <src.libnames.mk> define library names suitable 4# for INTERNALLIB and PRIVATELIB definition 5 6.if !target(__<bsd.init.mk>__) 7.error src.libnames.mk cannot be included directly. 8.endif 9 10.if !target(__<src.libnames.mk>__) 11__<src.libnames.mk>__: 12 13.include <src.opts.mk> 14 15_PRIVATELIBS= \ 16 atf_c \ 17 atf_cxx \ 18 auditd \ 19 bsddialog \ 20 bsdstat \ 21 cbor \ 22 devdctl \ 23 event1 \ 24 fido2 \ 25 gmock \ 26 gtest \ 27 gmock_main \ 28 gtest_main \ 29 heimipcc \ 30 heimipcs \ 31 ldns \ 32 sqlite3 \ 33 ssh \ 34 ucl \ 35 unbound \ 36 zstd 37 38# Let projects based on FreeBSD append to _PRIVATELIBS 39# by maintaining their own LOCAL_PRIVATELIBS list. 40_PRIVATELIBS+= ${LOCAL_PRIVATELIBS} 41 42_INTERNALLIBS= \ 43 amu \ 44 bsnmptools \ 45 c_nossp_pic \ 46 cron \ 47 elftc \ 48 fifolog \ 49 ifconfig \ 50 ipf \ 51 iscsiutil \ 52 lpr \ 53 lua \ 54 lutok \ 55 netbsd \ 56 ntp \ 57 ntpevent \ 58 openbsd \ 59 opts \ 60 parse \ 61 pe \ 62 pfctl \ 63 pmcstat \ 64 sl \ 65 sm \ 66 smdb \ 67 smutil \ 68 telnet \ 69 vers \ 70 wpaap \ 71 wpacommon \ 72 wpacrypto \ 73 wpadrivers \ 74 wpaeap_common \ 75 wpaeap_peer \ 76 wpaeap_server \ 77 wpaeapol_auth \ 78 wpaeapol_supp \ 79 wpal2_packet \ 80 wparadius \ 81 wparsn_supp \ 82 wpatls \ 83 wpautils \ 84 wpawps 85 86# Let projects based on FreeBSD append to _INTERNALLIBS 87# by maintaining their own LOCAL_INTERNALLIBS list. 88_INTERNALLIBS+= ${LOCAL_INTERNALLIBS} 89 90_LIBRARIES= \ 91 ${_PRIVATELIBS} \ 92 ${_INTERNALLIBS} \ 93 ${LOCAL_LIBRARIES} \ 94 80211 \ 95 9p \ 96 alias \ 97 archive \ 98 asn1 \ 99 avl \ 100 BlocksRuntime \ 101 be \ 102 begemot \ 103 bluetooth \ 104 bsdxml \ 105 bsm \ 106 bsnmp \ 107 bz2 \ 108 c \ 109 c_pic \ 110 calendar \ 111 cam \ 112 casper \ 113 cap_dns \ 114 cap_fileargs \ 115 cap_grp \ 116 cap_net \ 117 cap_netdb \ 118 cap_pwd \ 119 cap_sysctl \ 120 cap_syslog \ 121 com_err \ 122 compiler_rt \ 123 crypt \ 124 crypto \ 125 ctf \ 126 cuse \ 127 cxxrt \ 128 devctl \ 129 devdctl \ 130 devinfo \ 131 devstat \ 132 dialog \ 133 dl \ 134 dpv \ 135 dtrace \ 136 dwarf \ 137 edit \ 138 efivar \ 139 elf \ 140 execinfo \ 141 fetch \ 142 figpar \ 143 formw \ 144 geom \ 145 gpio \ 146 gssapi \ 147 gssapi_krb5 \ 148 hdb \ 149 heimbase \ 150 heimntlm \ 151 heimsqlite \ 152 hx509 \ 153 icp \ 154 ipsec \ 155 ipt \ 156 jail \ 157 kadm5clnt \ 158 kadm5srv \ 159 kafs5 \ 160 kdc \ 161 kiconv \ 162 krb5 \ 163 kvm \ 164 l \ 165 lzma \ 166 m \ 167 magic \ 168 md \ 169 memstat \ 170 mp \ 171 mt \ 172 ncursesw \ 173 netgraph \ 174 netmap \ 175 ngatm \ 176 nv \ 177 nvpair \ 178 opencsd \ 179 pam \ 180 panel \ 181 panelw \ 182 pcap \ 183 pcsclite \ 184 pjdlog \ 185 pmc \ 186 proc \ 187 procstat \ 188 pthread \ 189 radius \ 190 regex \ 191 roken \ 192 rpcsec_gss \ 193 rpcsvc \ 194 rt \ 195 rtld_db \ 196 sbuf \ 197 sdp \ 198 sm \ 199 smb \ 200 spl \ 201 ssl \ 202 ssp_nonshared \ 203 stats \ 204 stdthreads \ 205 supcplusplus \ 206 sysdecode \ 207 tacplus \ 208 termcapw \ 209 tinfow \ 210 tpool \ 211 ufs \ 212 ugidfw \ 213 ulog \ 214 umem \ 215 usb \ 216 usbhid \ 217 util \ 218 uutil \ 219 vmmapi \ 220 wind \ 221 wrap \ 222 xo \ 223 y \ 224 ypclnt \ 225 z \ 226 zfs_core \ 227 zfs \ 228 zfsbootenv \ 229 zpool \ 230 zutil 231 232.if ${MK_BLACKLIST} != "no" 233_LIBRARIES+= \ 234 blacklist \ 235 236.endif 237 238.if ${MK_OFED} != "no" 239_LIBRARIES+= \ 240 cxgb4 \ 241 ibcm \ 242 ibmad \ 243 ibnetdisc \ 244 ibumad \ 245 ibverbs \ 246 irdma \ 247 mlx4 \ 248 mlx5 \ 249 rdmacm \ 250 osmcomp \ 251 opensm \ 252 osmvendor 253.endif 254 255.if ${MK_BEARSSL} == "yes" 256_LIBRARIES+= \ 257 bearssl \ 258 secureboot \ 259 260LIBBEARSSL?= ${LIBBEARSSLDIR}/libbearssl.a 261LIBSECUREBOOT?= ${LIBSECUREBOOTDIR}/libsecureboot.a 262.endif 263 264.if ${MK_VERIEXEC} == "yes" 265_LIBRARIES+= veriexec 266 267LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec.a 268.endif 269 270# Each library's LIBADD needs to be duplicated here for static linkage of 271# 2nd+ order consumers. Auto-generating this would be better. 272_DP_80211= sbuf bsdxml 273_DP_9p= sbuf 274# XXX: Not bootstrapped so uses host version on non-FreeBSD, so don't use a 275# FreeBSD-specific dependency list 276.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) 277_DP_archive= z bz2 lzma bsdxml zstd 278.endif 279_DP_avl= spl 280_DP_bsddialog= formw ncursesw tinfow 281_DP_zstd= pthread 282.if ${MK_BLACKLIST} != "no" 283_DP_blacklist+= pthread 284.endif 285_DP_crypto= pthread 286# See comment by _DP_archive above 287.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) 288.if ${MK_OPENSSL} != "no" 289_DP_archive+= crypto 290.else 291_DP_archive+= md 292.endif 293.endif 294_DP_sqlite3= pthread 295_DP_ssl= crypto 296_DP_ssh= crypto crypt z 297.if ${MK_LDNS} != "no" 298_DP_ssh+= ldns 299.endif 300_DP_edit= tinfow 301.if ${MK_OPENSSL} != "no" 302_DP_bsnmp= crypto 303.endif 304_DP_geom= bsdxml sbuf 305_DP_cam= sbuf 306_DP_kvm= elf 307_DP_casper= nv 308_DP_cap_dns= nv 309_DP_cap_fileargs= nv 310_DP_cap_grp= nv 311_DP_cap_pwd= nv 312_DP_cap_sysctl= nv 313_DP_cap_syslog= nv 314.if ${MK_OFED} != "no" 315_DP_pcap= ibverbs mlx5 316.endif 317_DP_pjdlog= util 318_DP_usb= pthread 319_DP_unbound= ssl crypto pthread 320_DP_rt= pthread 321.if ${MK_OPENSSL} == "no" 322_DP_radius= md 323.else 324_DP_radius= crypto 325.endif 326_DP_rtld_db= elf procstat 327_DP_procstat= kvm util elf 328_DP_proc= cxxrt 329.if ${MK_CDDL} != "no" 330_DP_proc+= ctf 331.endif 332_DP_proc+= elf procstat rtld_db util z 333_DP_mp= crypto 334_DP_memstat= kvm 335_DP_magic= z 336_DP_mt= sbuf bsdxml 337_DP_ldns= ssl crypto 338_DP_lua= m 339_DP_lutok= lua 340.if ${MK_OPENSSL} != "no" 341_DP_fetch= ssl crypto 342.else 343_DP_fetch= md 344.endif 345_DP_execinfo= elf 346_DP_dwarf= elf z 347_DP_dpv= dialog figpar util tinfow ncursesw 348_DP_dialog= tinfow ncursesw m 349_DP_cuse= pthread 350_DP_atf_cxx= atf_c 351_DP_gtest= pthread regex 352_DP_gmock= gtest 353_DP_gmock_main= gmock 354_DP_gtest_main= gtest 355_DP_devstat= kvm 356_DP_pam= radius tacplus md util 357.if ${MK_KERBEROS} != "no" 358_DP_pam+= krb5 359.endif 360.if ${MK_OPENSSH} != "no" 361_DP_fido2+= crypto z 362_DP_pam+= ssh 363.endif 364.if ${MK_NIS} != "no" 365_DP_pam+= ypclnt 366.endif 367_DP_roken= crypt 368_DP_kadm5clnt= com_err krb5 roken 369_DP_kadm5srv= com_err hdb krb5 roken 370_DP_heimntlm= crypto com_err krb5 roken 371_DP_hx509= asn1 com_err crypto roken wind 372_DP_hdb= asn1 com_err krb5 roken sqlite3 373_DP_asn1= com_err roken 374_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto 375_DP_wind= com_err roken 376_DP_heimbase= pthread 377_DP_heimipcc= heimbase roken pthread 378_DP_heimipcs= heimbase roken pthread 379_DP_kafs5= asn1 krb5 roken 380_DP_krb5= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc 381_DP_gssapi_krb5= gssapi krb5 crypto roken asn1 com_err 382_DP_lzma= md pthread 383_DP_ucl= m 384_DP_vmmapi= util 385_DP_opencsd= cxxrt 386_DP_ctf= spl z 387_DP_dtrace= ctf elf proc pthread rtld_db 388_DP_xo= util 389_DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp 390# The libc dependencies are not strictly needed but are defined to make the 391# assert happy. 392_DP_c= compiler_rt 393# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls 394# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. 395.if ${MK_SSP} != "no" && \ 396 (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") 397_DP_c+= ssp_nonshared 398.endif 399_DP_stats= sbuf pthread 400_DP_stdthreads= pthread 401_DP_tacplus= md 402_DP_ncursesw= tinfow 403_DP_formw= ncursesw 404_DP_nvpair= spl 405_DP_panelw= ncursesw 406_DP_rpcsec_gss= gssapi 407_DP_smb= kiconv 408_DP_ulog= md 409_DP_fifolog= z 410_DP_ipf= kvm 411_DP_tpool= spl 412_DP_uutil= avl spl 413_DP_zfs= md pthread umem util uutil m avl bsdxml crypto geom nvpair \ 414 z zfs_core zutil 415_DP_zfsbootenv= zfs nvpair 416_DP_zfs_core= nvpair spl zutil 417_DP_zpool= md pthread z icp spl nvpair avl umem 418_DP_zutil= avl geom m tpool 419_DP_be= zfs spl nvpair zfsbootenv 420_DP_netmap= 421_DP_ifconfig= m 422_DP_pfctl= nv 423 424# OFED support 425.if ${MK_OFED} != "no" 426_DP_cxgb4= ibverbs pthread 427_DP_ibcm= ibverbs 428_DP_ibmad= ibumad 429_DP_ibnetdisc= osmcomp ibmad ibumad 430_DP_ibumad= 431_DP_ibverbs= 432_DP_irdma= ibverbs pthread 433_DP_mlx4= ibverbs pthread 434_DP_mlx5= ibverbs pthread 435_DP_rdmacm= ibverbs 436_DP_osmcomp= pthread 437_DP_opensm= pthread 438_DP_osmvendor= ibumad pthread 439.endif 440 441# Define special cases 442LDADD_supcplusplus= -lsupc++ 443LIBATF_C= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c.a 444LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a 445LDADD_atf_c= -lprivateatf-c 446LDADD_atf_cxx= -lprivateatf-c++ 447 448LIBGMOCK= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock.a 449LIBGMOCK_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock_main.a 450LIBGTEST= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest.a 451LIBGTEST_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest_main.a 452LDADD_gmock= -lprivategmock 453LDADD_gtest= -lprivategtest 454LDADD_gmock_main= -lprivategmock_main 455LDADD_gtest_main= -lprivategtest_main 456 457.for _l in ${_PRIVATELIBS} 458LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a 459.endfor 460 461.if ${MK_PIE} != "no" 462PIE_SUFFIX= _pie 463.endif 464 465.for _l in ${_LIBRARIES} 466.if ${_INTERNALLIBS:M${_l}} || !defined(SYSROOT) 467LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} 468.endif 469DPADD_${_l}?= ${LIB${_l:tu}} 470.if ${_PRIVATELIBS:M${_l}} 471LDADD_${_l}?= -lprivate${_l} 472.elif ${_INTERNALLIBS:M${_l}} 473LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l:S/${PIE_SUFFIX}//}${PIE_SUFFIX} 474.else 475LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} 476.endif 477# Add in all dependencies for static linkage. 478# Bootstrapping from non-FreeBSD needs special handling, since it overrides 479# NO_SHARED back to yes despite only building static versions of bootstrap 480# libraries (see tools/build/mk/Makefile.boot.pre). 481.if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \ 482 (defined(NO_SHARED) && ${NO_SHARED:tl} != "no") || \ 483 (defined(BOOTSTRAPPING) && ${.MAKE.OS} != "FreeBSD")) 484.for _d in ${_DP_${_l}} 485DPADD_${_l}+= ${DPADD_${_d}} 486LDADD_${_l}+= ${LDADD_${_d}} 487.endfor 488.endif 489.endfor 490 491# These are special cases where the library is broken and anything that uses 492# it needs to add more dependencies. Broken usually means that it has a 493# cyclic dependency and cannot link its own dependencies. This is bad, please 494# fix the library instead. 495# Unless the library itself is broken then the proper place to define 496# dependencies is _DP_* above. 497 498# libatf-c++ exposes libatf-c abi hence we need to explicit link to atf_c for 499# atf_cxx 500DPADD_atf_cxx+= ${DPADD_atf_c} 501LDADD_atf_cxx+= ${LDADD_atf_c} 502 503DPADD_gmock+= ${DPADD_gtest} 504LDADD_gmock+= ${LDADD_gtest} 505 506DPADD_gmock_main+= ${DPADD_gmock} 507LDADD_gmock_main+= ${LDADD_gmock} 508 509DPADD_gtest_main+= ${DPADD_gtest} 510LDADD_gtest_main+= ${LDADD_gtest} 511 512# Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here. 513_BADLDADD= 514.for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,} 515.if ${_LIBRARIES:M${_l}} && !${_PRIVATELIBS:M${_l}} 516_BADLDADD+= ${_l} 517.endif 518.endfor 519.if !empty(_BADLDADD) 520.error ${.CURDIR}: These libraries should be LIBADD+=foo rather than DPADD/LDADD+=-lfoo: ${_BADLDADD} 521.endif 522 523.for _l in ${LIBADD} 524DPADD+= ${DPADD_${_l}} 525LDADD+= ${LDADD_${_l}} 526.endfor 527 528_LIB_OBJTOP?= ${OBJTOP} 529# INTERNALLIB definitions. 530LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc 531LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a 532 533LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua 534LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a 535 536LIBLUTOKDIR= ${_LIB_OBJTOP}/lib/liblutok 537LIBLUTOK?= ${LIBLUTOKDIR}/liblutok${PIE_SUFFIX}.a 538 539LIBPEDIR= ${_LIB_OBJTOP}/lib/libpe 540LIBPE?= ${LIBPEDIR}/libpe${PIE_SUFFIX}.a 541 542LIBOPENBSDDIR= ${_LIB_OBJTOP}/lib/libopenbsd 543LIBOPENBSD?= ${LIBOPENBSDDIR}/libopenbsd${PIE_SUFFIX}.a 544 545LIBSMDIR= ${_LIB_OBJTOP}/lib/libsm 546LIBSM?= ${LIBSMDIR}/libsm${PIE_SUFFIX}.a 547 548LIBSMDBDIR= ${_LIB_OBJTOP}/lib/libsmdb 549LIBSMDB?= ${LIBSMDBDIR}/libsmdb${PIE_SUFFIX}.a 550 551LIBSMUTILDIR= ${_LIB_OBJTOP}/lib/libsmutil 552LIBSMUTIL?= ${LIBSMUTILDIR}/libsmutil${PIE_SUFFIX}.a 553 554LIBNETBSDDIR?= ${_LIB_OBJTOP}/lib/libnetbsd 555LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd${PIE_SUFFIX}.a 556 557LIBVERSDIR?= ${_LIB_OBJTOP}/kerberos5/lib/libvers 558LIBVERS?= ${LIBVERSDIR}/libvers${PIE_SUFFIX}.a 559 560LIBSLDIR= ${_LIB_OBJTOP}/kerberos5/lib/libsl 561LIBSL?= ${LIBSLDIR}/libsl${PIE_SUFFIX}.a 562 563LIBIFCONFIGDIR= ${_LIB_OBJTOP}/lib/libifconfig 564LIBIFCONFIG?= ${LIBIFCONFIGDIR}/libifconfig${PIE_SUFFIX}.a 565 566LIBIPFDIR= ${_LIB_OBJTOP}/sbin/ipf/libipf 567LIBIPF?= ${LIBIPFDIR}/libipf${PIE_SUFFIX}.a 568 569LIBNVDIR= ${_LIB_OBJTOP}/lib/libnv 570LIBNV?= ${LIBNVDIR}/libnv${PIE_SUFFIX}.a 571 572LIBISCSIUTILDIR= ${_LIB_OBJTOP}/lib/libiscsiutil 573LIBISCSIUTIL?= ${LIBISCSIUTILDIR}/libiscsiutil${PIE_SUFFIX}.a 574 575LIBTELNETDIR= ${_LIB_OBJTOP}/lib/libtelnet 576LIBTELNET?= ${LIBTELNETDIR}/libtelnet${PIE_SUFFIX}.a 577 578LIBCRONDIR= ${_LIB_OBJTOP}/usr.sbin/cron/lib 579LIBCRON?= ${LIBCRONDIR}/libcron${PIE_SUFFIX}.a 580 581LIBNTPDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libntp 582LIBNTP?= ${LIBNTPDIR}/libntp${PIE_SUFFIX}.a 583 584LIBNTPEVENTDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libntpevent 585LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent${PIE_SUFFIX}.a 586 587LIBOPTSDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libopts 588LIBOPTS?= ${LIBOPTSDIR}/libopts${PIE_SUFFIX}.a 589 590LIBPARSEDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libparse 591LIBPARSE?= ${LIBPARSEDIR}/libparse${PIE_SUFFIX}.a 592 593LIBPFCTL= ${_LIB_OBJTOP}/lib/libpfctl 594LIBPFCTL?= ${LIBPFCTLDIR}/libpfctl${PIE_SUFFIX}.a 595 596LIBLPRDIR= ${_LIB_OBJTOP}/usr.sbin/lpr/common_source 597LIBLPR?= ${LIBLPRDIR}/liblpr${PIE_SUFFIX}.a 598 599LIBFIFOLOGDIR= ${_LIB_OBJTOP}/usr.sbin/fifolog/lib 600LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog${PIE_SUFFIX}.a 601 602LIBBSNMPTOOLSDIR= ${_LIB_OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools 603LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools${PIE_SUFFIX}.a 604 605LIBBE?= ${LIBBEDIR}/libbe${PIE_SUFFIX}.a 606 607LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat 608LIBPMCSTAT?= ${LIBPMCSTATDIR}/libpmcstat${PIE_SUFFIX}.a 609 610LIBWPAAPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/ap 611LIBWPAAP?= ${LIBWPAAPDIR}/libwpaap${PIE_SUFFIX}.a 612 613LIBWPACOMMONDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/common 614LIBWPACOMMON?= ${LIBWPACOMMONDIR}/libwpacommon${PIE_SUFFIX}.a 615 616LIBWPACRYPTODIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/crypto 617LIBWPACRYPTO?= ${LIBWPACRYPTODIR}/libwpacrypto${PIE_SUFFIX}.a 618 619LIBWPADRIVERSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/drivers 620LIBWPADRIVERS?= ${LIBWPADRIVERSDIR}/libwpadrivers${PIE_SUFFIX}.a 621 622LIBWPAEAP_COMMONDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_common 623LIBWPAEAP_COMMON?= ${LIBWPAEAP_COMMONDIR}/libwpaeap_common${PIE_SUFFIX}.a 624 625LIBWPAEAP_PEERDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_peer 626LIBWPAEAP_PEER?= ${LIBWPAEAP_PEERDIR}/libwpaeap_peer${PIE_SUFFIX}.a 627 628LIBWPAEAP_SERVERDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_server 629LIBWPAEAP_SERVER?= ${LIBWPAEAP_SERVERDIR}/libwpaeap_server${PIE_SUFFIX}.a 630 631LIBWPAEAPOL_AUTHDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eapol_auth 632LIBWPAEAPOL_AUTH?= ${LIBWPAEAPOL_AUTHDIR}/libwpaeapol_auth${PIE_SUFFIX}.a 633 634LIBWPAEAPOL_SUPPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eapol_supp 635LIBWPAEAPOL_SUPP?= ${LIBWPAEAPOL_SUPPDIR}/libwpaeapol_supp${PIE_SUFFIX}.a 636 637LIBWPAL2_PACKETDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/l2_packet 638LIBWPAL2_PACKET?= ${LIBWPAL2_PACKETDIR}/libwpal2_packet${PIE_SUFFIX}.a 639 640LIBWPARADIUSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/radius 641LIBWPARADIUS?= ${LIBWPARADIUSDIR}/libwparadius${PIE_SUFFIX}.a 642 643LIBWPARSN_SUPPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/rsn_supp 644LIBWPARSN_SUPP?= ${LIBWPARSN_SUPPDIR}/libwparsn_supp${PIE_SUFFIX}.a 645 646LIBWPATLSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/tls 647LIBWPATLS?= ${LIBWPATLSDIR}/libwpatls${PIE_SUFFIX}.a 648 649LIBWPAUTILSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/utils 650LIBWPAUTILS?= ${LIBWPAUTILSDIR}/libwpautils${PIE_SUFFIX}.a 651 652LIBWPAWPSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/wps 653LIBWPAWPS?= ${LIBWPAWPSDIR}/libwpawps${PIE_SUFFIX}.a 654 655LIBC_NOSSP_PICDIR= ${_LIB_OBJTOP}/lib/libc 656LIBC_NOSSP_PIC?= ${LIBC_NOSSP_PICDIR}/libc_nossp_pic.a 657 658# Define a directory for each library. This is useful for adding -L in when 659# not using a --sysroot or for meta mode bootstrapping when there is no 660# Makefile.depend. These are sorted by directory. 661LIBAVLDIR= ${_LIB_OBJTOP}/cddl/lib/libavl 662LIBCTFDIR= ${_LIB_OBJTOP}/cddl/lib/libctf 663LIBDTRACEDIR= ${_LIB_OBJTOP}/cddl/lib/libdtrace 664LIBICPDIR= ${_LIB_OBJTOP}/cddl/lib/libicp 665LIBICP?= ${LIBICPDIR}/libicp${PIE_SUFFIX}.a 666LIBICP_RESCUEDIR= ${_LIB_OBJTOP}/cddl/lib/libicp_rescue 667LIBICP_RESCUE?= ${LIBICP_RESCUEDIR}/libicp_rescue${PIE_SUFFIX}.a 668LIBNVPAIRDIR= ${_LIB_OBJTOP}/cddl/lib/libnvpair 669LIBNVPAIR?= ${LIBNVPAIRDIR}/libnvpair${PIE_SUFFIX}.a 670LIBUMEMDIR= ${_LIB_OBJTOP}/cddl/lib/libumem 671LIBUUTILDIR= ${_LIB_OBJTOP}/cddl/lib/libuutil 672LIBZFSDIR= ${_LIB_OBJTOP}/cddl/lib/libzfs 673LIBZFS?= ${LIBZFSDIR}/libzfs${PIE_SUFFIX}.a 674LIBZFS_COREDIR= ${_LIB_OBJTOP}/cddl/lib/libzfs_core 675LIBZFS_CORE?= ${LIBZFS_COREDIR}/libzfs_core${PIE_SUFFIX}.a 676LIBZFSBOOTENVDIR= ${_LIB_OBJTOP}/cddl/lib/libzfsbootenv 677LIBZFSBOOTENV?= ${LIBZFSBOOTENVDIR}/libzfsbootenv${PIE_SUFFIX}.a 678LIBZPOOLDIR= ${_LIB_OBJTOP}/cddl/lib/libzpool 679LIBZPOOL?= ${LIBZPOOLDIR}/libzpool${PIE_SUFFIX}.a 680LIBZUTILDIR= ${_LIB_OBJTOP}/cddl/lib/libzutil 681LIBZUTIL?= ${LIBZUTILDIR}/libzutil${PIE_SUFFIX}.a 682LIBTPOOLDIR= ${_LIB_OBJTOP}/cddl/lib/libtpool 683 684# OFED support 685LIBCXGB4DIR= ${_LIB_OBJTOP}/lib/ofed/libcxgb4 686LIBIBCMDIR= ${_LIB_OBJTOP}/lib/ofed/libibcm 687LIBIBMADDIR= ${_LIB_OBJTOP}/lib/ofed/libibmad 688LIBIBNETDISCDIR=${_LIB_OBJTOP}/lib/ofed/libibnetdisc 689LIBIBUMADDIR= ${_LIB_OBJTOP}/lib/ofed/libibumad 690LIBIBVERBSDIR= ${_LIB_OBJTOP}/lib/ofed/libibverbs 691LIBIRDMADIR= ${_LIB_OBJTOP}/lib/ofed/libirdma 692LIBMLX4DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx4 693LIBMLX5DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx5 694LIBRDMACMDIR= ${_LIB_OBJTOP}/lib/ofed/librdmacm 695LIBOSMCOMPDIR= ${_LIB_OBJTOP}/lib/ofed/complib 696LIBOPENSMDIR= ${_LIB_OBJTOP}/lib/ofed/libopensm 697LIBOSMVENDORDIR=${_LIB_OBJTOP}/lib/ofed/libvendor 698 699LIBDIALOGDIR= ${_LIB_OBJTOP}/gnu/lib/libdialog 700LIBSSPDIR= ${_LIB_OBJTOP}/lib/libssp 701LIBSSP_NONSHAREDDIR= ${_LIB_OBJTOP}/lib/libssp_nonshared 702LIBASN1DIR= ${_LIB_OBJTOP}/kerberos5/lib/libasn1 703LIBGSSAPI_KRB5DIR= ${_LIB_OBJTOP}/kerberos5/lib/libgssapi_krb5 704LIBGSSAPI_NTLMDIR= ${_LIB_OBJTOP}/kerberos5/lib/libgssapi_ntlm 705LIBGSSAPI_SPNEGODIR= ${_LIB_OBJTOP}/kerberos5/lib/libgssapi_spnego 706LIBHDBDIR= ${_LIB_OBJTOP}/kerberos5/lib/libhdb 707LIBHEIMBASEDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimbase 708LIBHEIMIPCCDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimipcc 709LIBHEIMIPCSDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimipcs 710LIBHEIMNTLMDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimntlm 711LIBHX509DIR= ${_LIB_OBJTOP}/kerberos5/lib/libhx509 712LIBKADM5CLNTDIR= ${_LIB_OBJTOP}/kerberos5/lib/libkadm5clnt 713LIBKADM5SRVDIR= ${_LIB_OBJTOP}/kerberos5/lib/libkadm5srv 714LIBKAFS5DIR= ${_LIB_OBJTOP}/kerberos5/lib/libkafs5 715LIBKDCDIR= ${_LIB_OBJTOP}/kerberos5/lib/libkdc 716LIBKRB5DIR= ${_LIB_OBJTOP}/kerberos5/lib/libkrb5 717LIBROKENDIR= ${_LIB_OBJTOP}/kerberos5/lib/libroken 718LIBWINDDIR= ${_LIB_OBJTOP}/kerberos5/lib/libwind 719LIBATF_CDIR= ${_LIB_OBJTOP}/lib/atf/libatf-c 720LIBATF_CXXDIR= ${_LIB_OBJTOP}/lib/atf/libatf-c++ 721LIBGMOCKDIR= ${_LIB_OBJTOP}/lib/googletest/gmock 722LIBGMOCK_MAINDIR= ${_LIB_OBJTOP}/lib/googletest/gmock_main 723LIBGTESTDIR= ${_LIB_OBJTOP}/lib/googletest/gtest 724LIBGTEST_MAINDIR= ${_LIB_OBJTOP}/lib/googletest/gtest_main 725LIBALIASDIR= ${_LIB_OBJTOP}/lib/libalias/libalias 726LIBBLACKLISTDIR= ${_LIB_OBJTOP}/lib/libblacklist 727LIBBLOCKSRUNTIMEDIR= ${_LIB_OBJTOP}/lib/libblocksruntime 728LIBBSNMPDIR= ${_LIB_OBJTOP}/lib/libbsnmp/libbsnmp 729LIBCASPERDIR= ${_LIB_OBJTOP}/lib/libcasper/libcasper 730LIBCAP_DNSDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_dns 731LIBCAP_GRPDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_grp 732LIBCAP_NETDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_net 733LIBCAP_PWDDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_pwd 734LIBCAP_SYSCTLDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_sysctl 735LIBCAP_SYSLOGDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_syslog 736LIBCBORDIR= ${_LIB_OBJTOP}/lib/libcbor 737LIBBSDXMLDIR= ${_LIB_OBJTOP}/lib/libexpat 738LIBFIDO2DIR= ${_LIB_OBJTOP}/lib/libfido2 739LIBKVMDIR= ${_LIB_OBJTOP}/lib/libkvm 740LIBPTHREADDIR= ${_LIB_OBJTOP}/lib/libthr 741LIBMDIR= ${_LIB_OBJTOP}/lib/msun 742LIBFORMWDIR= ${_LIB_OBJTOP}/lib/ncurses/form 743LIBMENUWDIR= ${_LIB_OBJTOP}/lib/ncurses/menu 744LIBNCURSESWDIR= ${_LIB_OBJTOP}/lib/ncurses/ncurses 745LIBTINFOWDIR= ${_LIB_OBJTOP}/lib/ncurses/tinfo 746LIBPANELWDIR= ${_LIB_OBJTOP}/lib/ncurses/panel 747LIBCRYPTODIR= ${_LIB_OBJTOP}/secure/lib/libcrypto 748LIBSPLDIR= ${_LIB_OBJTOP}/cddl/lib/libspl 749LIBSSHDIR= ${_LIB_OBJTOP}/secure/lib/libssh 750LIBSSLDIR= ${_LIB_OBJTOP}/secure/lib/libssl 751LIBTEKENDIR= ${_LIB_OBJTOP}/sys/teken/libteken 752LIBEGACYDIR= ${_LIB_OBJTOP}/tools/build 753LIBLNDIR= ${_LIB_OBJTOP}/usr.bin/lex/lib 754 755LIBTERMCAPWDIR= ${LIBTINFOWDIR} 756 757.-include <site.src.libnames.mk> 758 759# Default other library directories to lib/libNAME. 760.for lib in ${_LIBRARIES} 761LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} 762.endfor 763 764# Validate that listed LIBADD are valid. 765.for _l in ${LIBADD} 766.if empty(_LIBRARIES:M${_l}) 767_BADLIBADD+= ${_l} 768.endif 769.endfor 770.if !empty(_BADLIBADD) 771.error ${.CURDIR}: Invalid LIBADD used which may need to be added to ${_this:T}: ${_BADLIBADD} 772.endif 773 774# Sanity check that libraries are defined here properly when building them. 775.if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" 776.if !empty(LIBADD) && \ 777 (!defined(_DP_${LIB}) || ${LIBADD:O:u} != ${_DP_${LIB}:O:u}) 778.error ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') 779.endif 780# Note that OBJTOP is not yet defined here but for the purpose of the check 781# it is fine as it resolves to the SRC directory. 782.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) 783.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} 784.endif 785.if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) 786.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a 787.endif 788.endif 789 790.endif # !target(__<src.libnames.mk>__) 791