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