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.if ${.OBJDIR:S,${.CURDIR},,} != ${.OBJDIR} 16ROOTOBJDIR= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} 17.elif defined(OBJTOP) && ${.OBJDIR:M${OBJTOP}*} != "" 18ROOTOBJDIR= ${OBJTOP} 19.endif 20 21_PRIVATELIBS= \ 22 atf_c \ 23 atf_cxx \ 24 bsdstat \ 25 event \ 26 heimipcc \ 27 heimipcs \ 28 ldns \ 29 sqlite3 \ 30 ssh \ 31 ucl \ 32 unbound 33 34_INTERNALLIBS= \ 35 amu \ 36 bsnmptools \ 37 cron \ 38 elftc \ 39 fifolog \ 40 ipf \ 41 lpr \ 42 netbsd \ 43 ntp \ 44 ntpevent \ 45 openbsd \ 46 opts \ 47 parse \ 48 readline \ 49 sl \ 50 sm \ 51 smdb \ 52 smutil \ 53 telnet \ 54 vers 55 56_LIBRARIES= \ 57 ${_PRIVATELIBS} \ 58 ${_INTERNALLIBS} \ 59 alias \ 60 archive \ 61 asn1 \ 62 auditd \ 63 avl \ 64 begemot \ 65 bluetooth \ 66 bsdxml \ 67 bsm \ 68 bsnmp \ 69 bz2 \ 70 c \ 71 c_pic \ 72 calendar \ 73 cam \ 74 capsicum \ 75 casper \ 76 com_err \ 77 compiler_rt \ 78 crypt \ 79 crypto \ 80 ctf \ 81 cuse \ 82 cxxrt \ 83 devctl \ 84 devinfo \ 85 devstat \ 86 dialog \ 87 dpv \ 88 dtrace \ 89 dwarf \ 90 edit \ 91 elf \ 92 execinfo \ 93 fetch \ 94 figpar \ 95 geom \ 96 gnuregex \ 97 gpio \ 98 gssapi \ 99 gssapi_krb5 \ 100 hdb \ 101 heimbase \ 102 heimntlm \ 103 heimsqlite \ 104 hx509 \ 105 ipsec \ 106 jail \ 107 kadm5clnt \ 108 kadm5srv \ 109 kafs5 \ 110 kdc \ 111 kiconv \ 112 krb5 \ 113 kvm \ 114 l \ 115 lzma \ 116 m \ 117 magic \ 118 md \ 119 memstat \ 120 mp \ 121 mt \ 122 nandfs \ 123 ncurses \ 124 ncursesw \ 125 netgraph \ 126 ngatm \ 127 nv \ 128 opie \ 129 pam \ 130 panel \ 131 panelw \ 132 pcap \ 133 pcsclite \ 134 pjdlog \ 135 pmc \ 136 proc \ 137 procstat \ 138 pthread \ 139 radius \ 140 readline \ 141 roken \ 142 rpcsec_gss \ 143 rpcsvc \ 144 rt \ 145 rtld_db \ 146 sbuf \ 147 sdp \ 148 sm \ 149 smb \ 150 ssl \ 151 ssp_nonshared \ 152 stdthreads \ 153 supcplusplus \ 154 tacplus \ 155 termcapw \ 156 ufs \ 157 ugidfw \ 158 ulog \ 159 usb \ 160 usbhid \ 161 util \ 162 vmmapi \ 163 wind \ 164 wrap \ 165 xo \ 166 y \ 167 ypclnt \ 168 z 169 170_DP_archive= z bz2 lzma bsdxml 171.if ${MK_OPENSSL} != "no" 172_DP_archive+= crypto 173.else 174_DP_archive+= md 175.endif 176_DP_ssl= crypto 177_DP_ssh= crypto crypt 178.if ${MK_LDNS} != "no" 179_DP_ssh+= ldns z 180.endif 181_DP_edit= ncursesw 182.if ${MK_OPENSSL} != "no" 183_DP_bsnmp= crypto 184.endif 185_DP_geom= bsdxml sbuf 186_DP_cam= sbuf 187_DP_casper= capsicum nv pjdlog 188_DP_capsicum= nv 189_DP_pjdlog= util 190_DP_opie= md 191_DP_usb= pthread 192_DP_unbound= pthread 193_DP_rt= pthread 194.if ${MK_OPENSSL} == "no" 195_DP_radius= md 196.else 197_DP_radius= crypto 198.endif 199_DP_procstat= kvm util elf 200.if ${MK_CXX} == "yes" 201.if ${MK_LIBCPLUSPLUS} != "no" 202_DP_proc= cxxrt 203.else 204_DP_proc= supcplusplus 205.endif 206.endif 207.if ${MK_CDDL} != "no" 208_DP_proc+= ctf 209.endif 210_DP_mp= crypto 211_DP_memstat= kvm 212_DP_magic= z 213_DP_mt= bsdxml 214_DP_ldns= crypto 215.if ${MK_OPENSSL} != "no" 216_DP_fetch= ssl crypto 217.else 218_DP_fetch= md 219.endif 220_DP_execinfo= elf 221_DP_dwarf= elf 222_DP_dpv= dialog figpar util 223_DP_dialog= ncursesw m 224_DP_cuse= pthread 225_DP_atf_cxx= atf_c 226_DP_devstat= kvm 227_DP_pam= radius tacplus opie md util 228.if ${MK_KERBEROS} != "no" 229_DP_pam+= krb5 230.endif 231.if ${MK_OPENSSH} != "no" 232_DP_pam+= ssh 233.endif 234.if ${MK_NIS} != "no" 235_DP_pam+= ypclnt 236.endif 237_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ 238 pthread 239_DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err 240_DP_lzma= pthread 241_DP_ucl= m 242_DP_vmmapi= util 243_DP_ctf= z 244_DP_proc= rtld_db util 245_DP_dtrace= rtld_db pthread 246_DP_xo= util 247 248# Define spacial cases 249LDADD_supcplusplus= -lsupc++ 250LIBATF_C= ${DESTDIR}${LIBDIR}/libprivateatf-c.a 251LIBATF_CXX= ${DESTDIR}${LIBDIR}/libprivateatf-c++.a 252LDADD_atf_c= -lprivateatf-c 253LDADD_atf_cxx= -lprivateatf-c++ 254 255.for _l in ${_PRIVATELIBS} 256LIB${_l:tu}?= ${DESTDIR}${LIBDIR}/libprivate${_l}.a 257.endfor 258 259.for _l in ${_LIBRARIES} 260.if ${_INTERNALLIBS:M${_l}} 261LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} 262.endif 263DPADD_${_l}?= ${LIB${_l:tu}} 264.if ${_PRIVATELIBS:M${_l}} 265LDADD_${_l}?= -lprivate${_l} 266.else 267LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} 268.endif 269.if defined(_DP_${_l}) && defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO") 270.for _d in ${_DP_${_l}} 271DPADD_${_l}+= ${DPADD_${_d}} 272LDADD_${_l}+= ${LDADD_${_d}} 273.endfor 274.endif 275.endfor 276 277DPADD_atf_cxx+= ${DPADD_atf_c} 278LDADD_atf_cxx+= ${LDADD_atf_c} 279 280DPADD_sqlite3+= ${DPADD_pthread} 281LDADD_sqlite3+= ${LDADD_pthread} 282 283DPADD_fifolog+= ${DPADD_z} 284LDADD_fifolog+= ${LDADD_z} 285 286DPADD_ipf+= ${DPADD_kvm} 287LDADD_ipf+= ${LDADD_kvm} 288 289DPADD_mt+= ${DPADD_sbuf} 290LDADD_mt+= ${LDADD_sbuf} 291 292DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} ${DPADD_proc} 293LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} 294 295# The following depends on libraries which are using pthread 296DPADD_hdb+= ${DPADD_pthread} 297LDADD_hdb+= ${LDADD_pthread} 298DPADD_kadm5srv+= ${DPADD_pthread} 299LDADD_kadm5srv+= ${LDADD_pthread} 300DPADD_krb5+= ${DPADD_pthread} 301LDADD_krb5+= ${LDADD_pthread} 302DPADD_gssapi_krb5+= ${DPADD_pthread} 303LDADD_gssapi_krb5+= ${LDADD_pthread} 304 305.for _l in ${LIBADD} 306DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} 307LDADD+= ${LDADD_${_l}} 308.endfor 309 310.if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} 311.error Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". 312.endif 313 314LIBELFTCDIR= ${ROOTOBJDIR}/lib/libelftc 315LIBELFTC?= ${LIBELFTCDIR}/libelftc.a 316 317LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline 318LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a 319 320LIBOPENBSDDIR= ${ROOTOBJDIR}/lib/libopenbsd 321LIBOPENBSD?= ${LIBOPENBSDDIR}/libopenbsd.a 322 323LIBSMDIR= ${ROOTOBJDIR}/lib/libsm 324LIBSM?= ${LIBSMDIR}/libsm.a 325 326LIBSMDBDIR= ${ROOTOBJDIR}/lib/libsmdb 327LIBSMDB?= ${LIBSMDBDIR}/libsmdb.a 328 329LIBSMUTILDIR= ${ROOTOBJDIR}/lib/libsmutil 330LIBSMUTIL?= ${LIBSMDBDIR}/libsmutil.a 331 332LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd 333LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a 334 335LIBVERSDIR?= ${ROOTOBJDIR}/kerberos5/lib/libvers 336LIBVERS?= ${LIBVERSDIR}/libvers.a 337 338LIBSLDIR= ${ROOTOBJDIR}/kerberos5/lib/libsl 339LIBSL?= ${LIBSLDIR}/libsl.a 340 341LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf 342LIBIPF?= ${LIBIPFDIR}/libipf.a 343 344LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet 345LIBTELNET?= ${LIBTELNETDIR}/libtelnet.a 346 347LIBCRONDIR= ${ROOTOBJDIR}/usr.sbin/cron/lib 348LIBCRON?= ${LIBCRONDIR}/libcron.a 349 350LIBNTPDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntp 351LIBNTP?= ${LIBNTPDIR}/libntp.a 352 353LIBNTPEVENTDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntpevent 354LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent.a 355 356LIBOPTSDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libopts 357LIBOTPS?= ${LIBOPTSDIR}/libopts.a 358 359LIBPARSEDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libparse 360LIBPARSE?= ${LIBPARSEDIR}/libparse.a 361 362LIBLPRDIR= ${ROOTOBJDIR}/usr.sbin/lpr/common_source 363LIBLPR?= ${LIBOPTSDIR}/liblpr.a 364 365LIBFIFOLOGDIR= ${ROOTOBJDIR}/usr.sbin/fifolog/lib 366LIBFIFOLOG?= ${LIBOPTSDIR}/libfifolog.a 367 368LIBBSNMPTOOLSDIR= ${ROOTOBJDIR}/usr.sbin/bsnmpd/tools/libbsnmptools 369LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a 370 371LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu 372LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a 373 374# Define a directory for each library. This is useful for adding -L in when 375# not using a --sysroot or for meta mode bootstrapping when there is no 376# Makefile.depend. These are sorted by directory. 377LIBAVLDIR= ${ROOTOBJDIR}/cddl/lib/libavl 378LIBCTFDIR= ${ROOTOBJDIR}/cddl/lib/libctf 379LIBDTRACEDIR= ${ROOTOBJDIR}/cddl/lib/libdtrace 380LIBNVPAIRDIR= ${ROOTOBJDIR}/cddl/lib/libnvpair 381LIBUMEMDIR= ${ROOTOBJDIR}/cddl/lib/libumem 382LIBUUTILDIR= ${ROOTOBJDIR}/cddl/lib/libuutil 383LIBZFSDIR= ${ROOTOBJDIR}/cddl/lib/libzfs 384LIBZFS_COREDIR= ${ROOTOBJDIR}/cddl/lib/libzfs_core 385LIBZPOOLDIR= ${ROOTOBJDIR}/cddl/lib/libzpool 386LIBDIALOGDIR= ${ROOTOBJDIR}/gnu/lib/libdialog 387LIBGCOVDIR= ${ROOTOBJDIR}/gnu/lib/libgcov 388LIBGOMPDIR= ${ROOTOBJDIR}/gnu/lib/libgomp 389LIBGNUREGEXDIR= ${ROOTOBJDIR}/gnu/lib/libregex 390LIBSSPDIR= ${ROOTOBJDIR}/gnu/lib/libssp 391LIBSSP_NONSHAREDDIR= ${ROOTOBJDIR}/gnu/lib/libssp/libssp_nonshared 392LIBSUPCPLUSPLUSDIR= ${ROOTOBJDIR}/gnu/lib/libsupc++ 393LIBASN1DIR= ${ROOTOBJDIR}/kerberos5/lib/libasn1 394LIBGSSAPI_KRB5DIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_krb5 395LIBGSSAPI_NTLMDIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_ntlm 396LIBGSSAPI_SPNEGODIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_spnego 397LIBHDBDIR= ${ROOTOBJDIR}/kerberos5/lib/libhdb 398LIBHEIMBASEDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimbase 399LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc 400LIBHEIMIPCSDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcs 401LIBHEIMNTLMDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimntlm 402LIBHX509DIR= ${ROOTOBJDIR}/kerberos5/lib/libhx509 403LIBKADM5CLNTDIR= ${ROOTOBJDIR}/kerberos5/lib/libkadm5clnt 404LIBKADM5SRVDIR= ${ROOTOBJDIR}/kerberos5/lib/libkadm5srv 405LIBKAFS5DIR= ${ROOTOBJDIR}/kerberos5/lib/libkafs5 406LIBKDCDIR= ${ROOTOBJDIR}/kerberos5/lib/libkdc 407LIBKRB5DIR= ${ROOTOBJDIR}/kerberos5/lib/libkrb5 408LIBROKENDIR= ${ROOTOBJDIR}/kerberos5/lib/libroken 409LIBWINDDIR= ${ROOTOBJDIR}/kerberos5/lib/libwind 410LIBALIASDIR= ${ROOTOBJDIR}/lib/libalias/libalias 411LIBBLOCKSRUNTIMEDIR= ${ROOTOBJDIR}/lib/libblocksruntime 412LIBBSNMPDIR= ${ROOTOBJDIR}/lib/libbsnmp/libbsnmp 413LIBBSDXMLDIR= ${ROOTOBJDIR}/lib/libexpat 414LIBKVMDIR= ${ROOTOBJDIR}/lib/libkvm 415LIBPTHREADDIR= ${ROOTOBJDIR}/lib/libthr 416LIBMDIR= ${ROOTOBJDIR}/lib/msun 417LIBFORMDIR= ${ROOTOBJDIR}/lib/ncurses/form 418LIBFORMLIBWDIR= ${ROOTOBJDIR}/lib/ncurses/formw 419LIBMENUDIR= ${ROOTOBJDIR}/lib/ncurses/menu 420LIBMENULIBWDIR= ${ROOTOBJDIR}/lib/ncurses/menuw 421LIBTERMCAPDIR= ${ROOTOBJDIR}/lib/ncurses/ncurses 422LIBTERMCAPWDIR= ${ROOTOBJDIR}/lib/ncurses/ncursesw 423LIBPANELDIR= ${ROOTOBJDIR}/lib/ncurses/panel 424LIBPANELWDIR= ${ROOTOBJDIR}/lib/ncurses/panelw 425LIBCRYPTODIR= ${ROOTOBJDIR}/secure/lib/libcrypto 426LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh 427LIBSSLDIR= ${ROOTOBJDIR}/secure/lib/libssl 428LIBTEKENDIR= ${ROOTOBJDIR}/sys/teken/libteken 429LIBEGACYDIR= ${ROOTOBJDIR}/tools/build 430LIBLNDIR= ${ROOTOBJDIR}/usr.bin/lex/lib 431 432# Default other library directories to lib/libNAME. 433.for lib in ${_LIBRARIES} 434LIB${lib:tu}DIR?= ${ROOTOBJDIR}/lib/lib${lib} 435.endfor 436 437.endif # !target(__<src.libnames.mk>__) 438