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