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