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