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