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.if ${MK_CASPER} != "no" 275_DP_9p+= casper cap_pwd cap_grp 276.endif 277 278# XXX: Not bootstrapped so uses host version on non-FreeBSD, so don't use a 279# FreeBSD-specific dependency list 280.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) 281_DP_archive= z bz2 lzma bsdxml zstd 282.endif 283_DP_avl= spl 284_DP_bsddialog= formw ncursesw tinfow 285_DP_zstd= pthread 286.if ${MK_BLACKLIST} != "no" 287_DP_blacklist+= pthread 288.endif 289_DP_crypto= pthread 290# See comment by _DP_archive above 291.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) 292.if ${MK_OPENSSL} != "no" 293_DP_archive+= crypto 294.else 295_DP_archive+= md 296.endif 297.endif 298_DP_sqlite3= pthread 299_DP_ssl= crypto 300_DP_ssh= crypto crypt z 301.if ${MK_LDNS} != "no" 302_DP_ssh+= ldns 303.endif 304_DP_edit= tinfow 305.if ${MK_OPENSSL} != "no" 306_DP_bsnmp= crypto 307.endif 308_DP_geom= bsdxml sbuf 309_DP_cam= sbuf 310_DP_kvm= elf 311_DP_casper= nv 312_DP_cap_dns= nv 313_DP_cap_fileargs= nv 314_DP_cap_grp= nv 315_DP_cap_pwd= nv 316_DP_cap_sysctl= nv 317_DP_cap_syslog= nv 318.if ${MK_OFED} != "no" 319_DP_pcap= ibverbs mlx5 320.endif 321_DP_pjdlog= util 322_DP_usb= pthread 323_DP_unbound= ssl crypto pthread 324_DP_rt= pthread 325.if ${MK_OPENSSL} == "no" 326_DP_radius= md 327.else 328_DP_radius= crypto 329.endif 330_DP_rtld_db= elf procstat 331_DP_procstat= kvm util elf 332_DP_proc= cxxrt 333.if ${MK_CDDL} != "no" 334_DP_proc+= ctf 335.endif 336_DP_proc+= elf procstat rtld_db util z 337_DP_mp= crypto 338_DP_memstat= kvm 339_DP_magic= z 340_DP_mt= sbuf bsdxml 341_DP_ldns= ssl crypto 342_DP_lua= m 343_DP_lutok= lua 344.if ${MK_OPENSSL} != "no" 345_DP_fetch= ssl crypto 346.else 347_DP_fetch= md 348.endif 349_DP_execinfo= elf 350_DP_dwarf= elf z 351_DP_dpv= dialog figpar util tinfow ncursesw 352_DP_dialog= tinfow ncursesw m 353_DP_cuse= pthread 354_DP_atf_cxx= atf_c 355_DP_gtest= pthread regex 356_DP_gmock= gtest 357_DP_gmock_main= gmock 358_DP_gtest_main= gtest 359_DP_devstat= kvm 360_DP_pam= radius tacplus md util 361.if ${MK_KERBEROS} != "no" 362_DP_pam+= krb5 363.endif 364.if ${MK_OPENSSH} != "no" 365_DP_fido2+= crypto z 366_DP_pam+= ssh 367.endif 368.if ${MK_NIS} != "no" 369_DP_pam+= ypclnt 370.endif 371_DP_roken= crypt 372_DP_kadm5clnt= com_err krb5 roken 373_DP_kadm5srv= com_err hdb krb5 roken 374_DP_heimntlm= crypto com_err krb5 roken 375_DP_hx509= asn1 com_err crypto roken wind 376_DP_hdb= asn1 com_err krb5 roken sqlite3 377_DP_asn1= com_err roken 378_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto 379_DP_wind= com_err roken 380_DP_heimbase= pthread 381_DP_heimipcc= heimbase roken pthread 382_DP_heimipcs= heimbase roken pthread 383_DP_kafs5= asn1 krb5 roken 384_DP_krb5= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc 385_DP_gssapi_krb5= gssapi krb5 crypto roken asn1 com_err 386_DP_lzma= md pthread 387_DP_ucl= m 388_DP_vmmapi= util 389_DP_opencsd= cxxrt 390_DP_ctf= spl z 391_DP_dtrace= ctf elf proc pthread rtld_db 392_DP_xo= util 393_DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp 394# The libc dependencies are not strictly needed but are defined to make the 395# assert happy. 396_DP_c= compiler_rt 397# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls 398# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. 399.if ${MK_SSP} != "no" && \ 400 (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") 401_DP_c+= ssp_nonshared 402.endif 403_DP_stats= sbuf pthread 404_DP_stdthreads= pthread 405_DP_tacplus= md 406_DP_ncursesw= tinfow 407_DP_formw= ncursesw 408_DP_nvpair= spl 409_DP_panelw= ncursesw 410_DP_rpcsec_gss= gssapi 411_DP_smb= kiconv 412_DP_ulog= md 413_DP_fifolog= z 414_DP_ipf= kvm 415_DP_tpool= spl 416_DP_uutil= avl spl 417_DP_zfs= md pthread umem util uutil m avl bsdxml crypto geom nvpair \ 418 z zfs_core zutil 419_DP_zfsbootenv= zfs nvpair 420_DP_zfs_core= nvpair spl zutil 421_DP_zpool= md pthread z icp spl nvpair avl umem 422_DP_zutil= avl geom m tpool 423_DP_be= zfs spl nvpair zfsbootenv 424_DP_netmap= 425_DP_ifconfig= m 426_DP_pfctl= nv 427 428# OFED support 429.if ${MK_OFED} != "no" 430_DP_cxgb4= ibverbs pthread 431_DP_ibcm= ibverbs 432_DP_ibmad= ibumad 433_DP_ibnetdisc= osmcomp ibmad ibumad 434_DP_ibumad= 435_DP_ibverbs= 436_DP_irdma= ibverbs pthread 437_DP_mlx4= ibverbs pthread 438_DP_mlx5= ibverbs pthread 439_DP_rdmacm= ibverbs 440_DP_osmcomp= pthread 441_DP_opensm= pthread 442_DP_osmvendor= ibumad pthread 443.endif 444 445# Define special cases 446LDADD_supcplusplus= -lsupc++ 447LIBATF_C= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c.a 448LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a 449LDADD_atf_c= -lprivateatf-c 450LDADD_atf_cxx= -lprivateatf-c++ 451 452LIBGMOCK= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock.a 453LIBGMOCK_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock_main.a 454LIBGTEST= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest.a 455LIBGTEST_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest_main.a 456LDADD_gmock= -lprivategmock 457LDADD_gtest= -lprivategtest 458LDADD_gmock_main= -lprivategmock_main 459LDADD_gtest_main= -lprivategtest_main 460 461.for _l in ${_PRIVATELIBS} 462LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a 463.endfor 464 465.if ${MK_PIE} != "no" 466PIE_SUFFIX= _pie 467.endif 468 469.for _l in ${_LIBRARIES} 470.if ${_INTERNALLIBS:M${_l}} || !defined(SYSROOT) 471LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} 472.endif 473DPADD_${_l}?= ${LIB${_l:tu}} 474.if ${_PRIVATELIBS:M${_l}} 475LDADD_${_l}?= -lprivate${_l} 476.elif ${_INTERNALLIBS:M${_l}} 477LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l:S/${PIE_SUFFIX}//}${PIE_SUFFIX} 478.else 479LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} 480.endif 481# Add in all dependencies for static linkage. 482# Bootstrapping from non-FreeBSD needs special handling, since it overrides 483# NO_SHARED back to yes despite only building static versions of bootstrap 484# libraries (see tools/build/mk/Makefile.boot.pre). 485.if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \ 486 (defined(NO_SHARED) && ${NO_SHARED:tl} != "no") || \ 487 (defined(BOOTSTRAPPING) && ${.MAKE.OS} != "FreeBSD")) 488.for _d in ${_DP_${_l}} 489DPADD_${_l}+= ${DPADD_${_d}} 490LDADD_${_l}+= ${LDADD_${_d}} 491.endfor 492.endif 493.endfor 494 495# These are special cases where the library is broken and anything that uses 496# it needs to add more dependencies. Broken usually means that it has a 497# cyclic dependency and cannot link its own dependencies. This is bad, please 498# fix the library instead. 499# Unless the library itself is broken then the proper place to define 500# dependencies is _DP_* above. 501 502# libatf-c++ exposes libatf-c abi hence we need to explicit link to atf_c for 503# atf_cxx 504DPADD_atf_cxx+= ${DPADD_atf_c} 505LDADD_atf_cxx+= ${LDADD_atf_c} 506 507DPADD_gmock+= ${DPADD_gtest} 508LDADD_gmock+= ${LDADD_gtest} 509 510DPADD_gmock_main+= ${DPADD_gmock} 511LDADD_gmock_main+= ${LDADD_gmock} 512 513DPADD_gtest_main+= ${DPADD_gtest} 514LDADD_gtest_main+= ${LDADD_gtest} 515 516# Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here. 517_BADLDADD= 518.for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,} 519.if ${_LIBRARIES:M${_l}} && !${_PRIVATELIBS:M${_l}} 520_BADLDADD+= ${_l} 521.endif 522.endfor 523.if !empty(_BADLDADD) 524.error ${.CURDIR}: These libraries should be LIBADD+=foo rather than DPADD/LDADD+=-lfoo: ${_BADLDADD} 525.endif 526 527.for _l in ${LIBADD} 528DPADD+= ${DPADD_${_l}} 529LDADD+= ${LDADD_${_l}} 530.endfor 531 532_LIB_OBJTOP?= ${OBJTOP} 533# INTERNALLIB definitions. 534LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc 535LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a 536 537LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua 538LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a 539 540LIBLUTOKDIR= ${_LIB_OBJTOP}/lib/liblutok 541LIBLUTOK?= ${LIBLUTOKDIR}/liblutok${PIE_SUFFIX}.a 542 543LIBPEDIR= ${_LIB_OBJTOP}/lib/libpe 544LIBPE?= ${LIBPEDIR}/libpe${PIE_SUFFIX}.a 545 546LIBOPENBSDDIR= ${_LIB_OBJTOP}/lib/libopenbsd 547LIBOPENBSD?= ${LIBOPENBSDDIR}/libopenbsd${PIE_SUFFIX}.a 548 549LIBSMDIR= ${_LIB_OBJTOP}/lib/libsm 550LIBSM?= ${LIBSMDIR}/libsm${PIE_SUFFIX}.a 551 552LIBSMDBDIR= ${_LIB_OBJTOP}/lib/libsmdb 553LIBSMDB?= ${LIBSMDBDIR}/libsmdb${PIE_SUFFIX}.a 554 555LIBSMUTILDIR= ${_LIB_OBJTOP}/lib/libsmutil 556LIBSMUTIL?= ${LIBSMUTILDIR}/libsmutil${PIE_SUFFIX}.a 557 558LIBNETBSDDIR?= ${_LIB_OBJTOP}/lib/libnetbsd 559LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd${PIE_SUFFIX}.a 560 561LIBVERSDIR?= ${_LIB_OBJTOP}/kerberos5/lib/libvers 562LIBVERS?= ${LIBVERSDIR}/libvers${PIE_SUFFIX}.a 563 564LIBSLDIR= ${_LIB_OBJTOP}/kerberos5/lib/libsl 565LIBSL?= ${LIBSLDIR}/libsl${PIE_SUFFIX}.a 566 567LIBIFCONFIGDIR= ${_LIB_OBJTOP}/lib/libifconfig 568LIBIFCONFIG?= ${LIBIFCONFIGDIR}/libifconfig${PIE_SUFFIX}.a 569 570LIBIPFDIR= ${_LIB_OBJTOP}/sbin/ipf/libipf 571LIBIPF?= ${LIBIPFDIR}/libipf${PIE_SUFFIX}.a 572 573LIBNVDIR= ${_LIB_OBJTOP}/lib/libnv 574LIBNV?= ${LIBNVDIR}/libnv${PIE_SUFFIX}.a 575 576LIBISCSIUTILDIR= ${_LIB_OBJTOP}/lib/libiscsiutil 577LIBISCSIUTIL?= ${LIBISCSIUTILDIR}/libiscsiutil${PIE_SUFFIX}.a 578 579LIBTELNETDIR= ${_LIB_OBJTOP}/lib/libtelnet 580LIBTELNET?= ${LIBTELNETDIR}/libtelnet${PIE_SUFFIX}.a 581 582LIBCRONDIR= ${_LIB_OBJTOP}/usr.sbin/cron/lib 583LIBCRON?= ${LIBCRONDIR}/libcron${PIE_SUFFIX}.a 584 585LIBNTPDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libntp 586LIBNTP?= ${LIBNTPDIR}/libntp${PIE_SUFFIX}.a 587 588LIBNTPEVENTDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libntpevent 589LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent${PIE_SUFFIX}.a 590 591LIBOPTSDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libopts 592LIBOPTS?= ${LIBOPTSDIR}/libopts${PIE_SUFFIX}.a 593 594LIBPARSEDIR= ${_LIB_OBJTOP}/usr.sbin/ntp/libparse 595LIBPARSE?= ${LIBPARSEDIR}/libparse${PIE_SUFFIX}.a 596 597LIBPFCTL= ${_LIB_OBJTOP}/lib/libpfctl 598LIBPFCTL?= ${LIBPFCTLDIR}/libpfctl${PIE_SUFFIX}.a 599 600LIBLPRDIR= ${_LIB_OBJTOP}/usr.sbin/lpr/common_source 601LIBLPR?= ${LIBLPRDIR}/liblpr${PIE_SUFFIX}.a 602 603LIBFIFOLOGDIR= ${_LIB_OBJTOP}/usr.sbin/fifolog/lib 604LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog${PIE_SUFFIX}.a 605 606LIBBSNMPTOOLSDIR= ${_LIB_OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools 607LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools${PIE_SUFFIX}.a 608 609LIBBE?= ${LIBBEDIR}/libbe${PIE_SUFFIX}.a 610 611LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat 612LIBPMCSTAT?= ${LIBPMCSTATDIR}/libpmcstat${PIE_SUFFIX}.a 613 614LIBWPAAPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/ap 615LIBWPAAP?= ${LIBWPAAPDIR}/libwpaap${PIE_SUFFIX}.a 616 617LIBWPACOMMONDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/common 618LIBWPACOMMON?= ${LIBWPACOMMONDIR}/libwpacommon${PIE_SUFFIX}.a 619 620LIBWPACRYPTODIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/crypto 621LIBWPACRYPTO?= ${LIBWPACRYPTODIR}/libwpacrypto${PIE_SUFFIX}.a 622 623LIBWPADRIVERSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/drivers 624LIBWPADRIVERS?= ${LIBWPADRIVERSDIR}/libwpadrivers${PIE_SUFFIX}.a 625 626LIBWPAEAP_COMMONDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_common 627LIBWPAEAP_COMMON?= ${LIBWPAEAP_COMMONDIR}/libwpaeap_common${PIE_SUFFIX}.a 628 629LIBWPAEAP_PEERDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_peer 630LIBWPAEAP_PEER?= ${LIBWPAEAP_PEERDIR}/libwpaeap_peer${PIE_SUFFIX}.a 631 632LIBWPAEAP_SERVERDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_server 633LIBWPAEAP_SERVER?= ${LIBWPAEAP_SERVERDIR}/libwpaeap_server${PIE_SUFFIX}.a 634 635LIBWPAEAPOL_AUTHDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eapol_auth 636LIBWPAEAPOL_AUTH?= ${LIBWPAEAPOL_AUTHDIR}/libwpaeapol_auth${PIE_SUFFIX}.a 637 638LIBWPAEAPOL_SUPPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eapol_supp 639LIBWPAEAPOL_SUPP?= ${LIBWPAEAPOL_SUPPDIR}/libwpaeapol_supp${PIE_SUFFIX}.a 640 641LIBWPAL2_PACKETDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/l2_packet 642LIBWPAL2_PACKET?= ${LIBWPAL2_PACKETDIR}/libwpal2_packet${PIE_SUFFIX}.a 643 644LIBWPARADIUSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/radius 645LIBWPARADIUS?= ${LIBWPARADIUSDIR}/libwparadius${PIE_SUFFIX}.a 646 647LIBWPARSN_SUPPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/rsn_supp 648LIBWPARSN_SUPP?= ${LIBWPARSN_SUPPDIR}/libwparsn_supp${PIE_SUFFIX}.a 649 650LIBWPATLSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/tls 651LIBWPATLS?= ${LIBWPATLSDIR}/libwpatls${PIE_SUFFIX}.a 652 653LIBWPAUTILSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/utils 654LIBWPAUTILS?= ${LIBWPAUTILSDIR}/libwpautils${PIE_SUFFIX}.a 655 656LIBWPAWPSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/wps 657LIBWPAWPS?= ${LIBWPAWPSDIR}/libwpawps${PIE_SUFFIX}.a 658 659LIBC_NOSSP_PICDIR= ${_LIB_OBJTOP}/lib/libc 660LIBC_NOSSP_PIC?= ${LIBC_NOSSP_PICDIR}/libc_nossp_pic.a 661 662# Define a directory for each library. This is useful for adding -L in when 663# not using a --sysroot or for meta mode bootstrapping when there is no 664# Makefile.depend. These are sorted by directory. 665LIBAVLDIR= ${_LIB_OBJTOP}/cddl/lib/libavl 666LIBCTFDIR= ${_LIB_OBJTOP}/cddl/lib/libctf 667LIBDTRACEDIR= ${_LIB_OBJTOP}/cddl/lib/libdtrace 668LIBICPDIR= ${_LIB_OBJTOP}/cddl/lib/libicp 669LIBICP?= ${LIBICPDIR}/libicp${PIE_SUFFIX}.a 670LIBICP_RESCUEDIR= ${_LIB_OBJTOP}/cddl/lib/libicp_rescue 671LIBICP_RESCUE?= ${LIBICP_RESCUEDIR}/libicp_rescue${PIE_SUFFIX}.a 672LIBNVPAIRDIR= ${_LIB_OBJTOP}/cddl/lib/libnvpair 673LIBNVPAIR?= ${LIBNVPAIRDIR}/libnvpair${PIE_SUFFIX}.a 674LIBUMEMDIR= ${_LIB_OBJTOP}/cddl/lib/libumem 675LIBUUTILDIR= ${_LIB_OBJTOP}/cddl/lib/libuutil 676LIBZFSDIR= ${_LIB_OBJTOP}/cddl/lib/libzfs 677LIBZFS?= ${LIBZFSDIR}/libzfs${PIE_SUFFIX}.a 678LIBZFS_COREDIR= ${_LIB_OBJTOP}/cddl/lib/libzfs_core 679LIBZFS_CORE?= ${LIBZFS_COREDIR}/libzfs_core${PIE_SUFFIX}.a 680LIBZFSBOOTENVDIR= ${_LIB_OBJTOP}/cddl/lib/libzfsbootenv 681LIBZFSBOOTENV?= ${LIBZFSBOOTENVDIR}/libzfsbootenv${PIE_SUFFIX}.a 682LIBZPOOLDIR= ${_LIB_OBJTOP}/cddl/lib/libzpool 683LIBZPOOL?= ${LIBZPOOLDIR}/libzpool${PIE_SUFFIX}.a 684LIBZUTILDIR= ${_LIB_OBJTOP}/cddl/lib/libzutil 685LIBZUTIL?= ${LIBZUTILDIR}/libzutil${PIE_SUFFIX}.a 686LIBTPOOLDIR= ${_LIB_OBJTOP}/cddl/lib/libtpool 687 688# OFED support 689LIBCXGB4DIR= ${_LIB_OBJTOP}/lib/ofed/libcxgb4 690LIBIBCMDIR= ${_LIB_OBJTOP}/lib/ofed/libibcm 691LIBIBMADDIR= ${_LIB_OBJTOP}/lib/ofed/libibmad 692LIBIBNETDISCDIR=${_LIB_OBJTOP}/lib/ofed/libibnetdisc 693LIBIBUMADDIR= ${_LIB_OBJTOP}/lib/ofed/libibumad 694LIBIBVERBSDIR= ${_LIB_OBJTOP}/lib/ofed/libibverbs 695LIBIRDMADIR= ${_LIB_OBJTOP}/lib/ofed/libirdma 696LIBMLX4DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx4 697LIBMLX5DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx5 698LIBRDMACMDIR= ${_LIB_OBJTOP}/lib/ofed/librdmacm 699LIBOSMCOMPDIR= ${_LIB_OBJTOP}/lib/ofed/complib 700LIBOPENSMDIR= ${_LIB_OBJTOP}/lib/ofed/libopensm 701LIBOSMVENDORDIR=${_LIB_OBJTOP}/lib/ofed/libvendor 702 703LIBDIALOGDIR= ${_LIB_OBJTOP}/gnu/lib/libdialog 704LIBSSPDIR= ${_LIB_OBJTOP}/lib/libssp 705LIBSSP_NONSHAREDDIR= ${_LIB_OBJTOP}/lib/libssp_nonshared 706LIBASN1DIR= ${_LIB_OBJTOP}/kerberos5/lib/libasn1 707LIBGSSAPI_KRB5DIR= ${_LIB_OBJTOP}/kerberos5/lib/libgssapi_krb5 708LIBGSSAPI_NTLMDIR= ${_LIB_OBJTOP}/kerberos5/lib/libgssapi_ntlm 709LIBGSSAPI_SPNEGODIR= ${_LIB_OBJTOP}/kerberos5/lib/libgssapi_spnego 710LIBHDBDIR= ${_LIB_OBJTOP}/kerberos5/lib/libhdb 711LIBHEIMBASEDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimbase 712LIBHEIMIPCCDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimipcc 713LIBHEIMIPCSDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimipcs 714LIBHEIMNTLMDIR= ${_LIB_OBJTOP}/kerberos5/lib/libheimntlm 715LIBHX509DIR= ${_LIB_OBJTOP}/kerberos5/lib/libhx509 716LIBKADM5CLNTDIR= ${_LIB_OBJTOP}/kerberos5/lib/libkadm5clnt 717LIBKADM5SRVDIR= ${_LIB_OBJTOP}/kerberos5/lib/libkadm5srv 718LIBKAFS5DIR= ${_LIB_OBJTOP}/kerberos5/lib/libkafs5 719LIBKDCDIR= ${_LIB_OBJTOP}/kerberos5/lib/libkdc 720LIBKRB5DIR= ${_LIB_OBJTOP}/kerberos5/lib/libkrb5 721LIBROKENDIR= ${_LIB_OBJTOP}/kerberos5/lib/libroken 722LIBWINDDIR= ${_LIB_OBJTOP}/kerberos5/lib/libwind 723LIBATF_CDIR= ${_LIB_OBJTOP}/lib/atf/libatf-c 724LIBATF_CXXDIR= ${_LIB_OBJTOP}/lib/atf/libatf-c++ 725LIBGMOCKDIR= ${_LIB_OBJTOP}/lib/googletest/gmock 726LIBGMOCK_MAINDIR= ${_LIB_OBJTOP}/lib/googletest/gmock_main 727LIBGTESTDIR= ${_LIB_OBJTOP}/lib/googletest/gtest 728LIBGTEST_MAINDIR= ${_LIB_OBJTOP}/lib/googletest/gtest_main 729LIBALIASDIR= ${_LIB_OBJTOP}/lib/libalias/libalias 730LIBBLACKLISTDIR= ${_LIB_OBJTOP}/lib/libblacklist 731LIBBLOCKSRUNTIMEDIR= ${_LIB_OBJTOP}/lib/libblocksruntime 732LIBBSNMPDIR= ${_LIB_OBJTOP}/lib/libbsnmp/libbsnmp 733LIBCASPERDIR= ${_LIB_OBJTOP}/lib/libcasper/libcasper 734LIBCAP_DNSDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_dns 735LIBCAP_GRPDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_grp 736LIBCAP_NETDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_net 737LIBCAP_PWDDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_pwd 738LIBCAP_SYSCTLDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_sysctl 739LIBCAP_SYSLOGDIR= ${_LIB_OBJTOP}/lib/libcasper/services/cap_syslog 740LIBCBORDIR= ${_LIB_OBJTOP}/lib/libcbor 741LIBBSDXMLDIR= ${_LIB_OBJTOP}/lib/libexpat 742LIBFIDO2DIR= ${_LIB_OBJTOP}/lib/libfido2 743LIBKVMDIR= ${_LIB_OBJTOP}/lib/libkvm 744LIBPTHREADDIR= ${_LIB_OBJTOP}/lib/libthr 745LIBMDIR= ${_LIB_OBJTOP}/lib/msun 746LIBFORMWDIR= ${_LIB_OBJTOP}/lib/ncurses/form 747LIBMENUWDIR= ${_LIB_OBJTOP}/lib/ncurses/menu 748LIBNCURSESWDIR= ${_LIB_OBJTOP}/lib/ncurses/ncurses 749LIBTINFOWDIR= ${_LIB_OBJTOP}/lib/ncurses/tinfo 750LIBPANELWDIR= ${_LIB_OBJTOP}/lib/ncurses/panel 751LIBCRYPTODIR= ${_LIB_OBJTOP}/secure/lib/libcrypto 752LIBSPLDIR= ${_LIB_OBJTOP}/cddl/lib/libspl 753LIBSSHDIR= ${_LIB_OBJTOP}/secure/lib/libssh 754LIBSSLDIR= ${_LIB_OBJTOP}/secure/lib/libssl 755LIBTEKENDIR= ${_LIB_OBJTOP}/sys/teken/libteken 756LIBEGACYDIR= ${_LIB_OBJTOP}/tools/build 757LIBLNDIR= ${_LIB_OBJTOP}/usr.bin/lex/lib 758 759LIBTERMCAPWDIR= ${LIBTINFOWDIR} 760 761.-include <site.src.libnames.mk> 762 763# Default other library directories to lib/libNAME. 764.for lib in ${_LIBRARIES} 765LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} 766.endfor 767 768# Validate that listed LIBADD are valid. 769.for _l in ${LIBADD} 770.if empty(_LIBRARIES:M${_l}) 771_BADLIBADD+= ${_l} 772.endif 773.endfor 774.if !empty(_BADLIBADD) 775.error ${.CURDIR}: Invalid LIBADD used which may need to be added to ${_this:T}: ${_BADLIBADD} 776.endif 777 778# Sanity check that libraries are defined here properly when building them. 779.if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" 780.if !empty(LIBADD) && \ 781 (!defined(_DP_${LIB}) || ${LIBADD:O:u} != ${_DP_${LIB}:O:u}) 782.error ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') 783.endif 784# Note that OBJTOP is not yet defined here but for the purpose of the check 785# it is fine as it resolves to the SRC directory. 786.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) 787.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} 788.endif 789.if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) 790.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a 791.endif 792.endif 793 794.endif # !target(__<src.libnames.mk>__) 795