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.include <src.opts.mk> 11 12ROOTSRCDIR= ${.MAKE.MAKEFILES:M*/src.libnames.mk:H:H:H} 13ROOTOBJDIR= ${.OBJDIR:S/${.CURDIR}//}${ROOTSRCDIR} 14_PRIVATELIBS= \ 15 atf_c \ 16 atf_cxx \ 17 bsdstat \ 18 heimipcc \ 19 heimipcs \ 20 ldns \ 21 sqlite3 \ 22 ssh \ 23 ucl \ 24 unbound 25 26_INTERNALIBS= \ 27 amu \ 28 bsnmptools \ 29 cron \ 30 elftc \ 31 event \ 32 fifolog \ 33 ipf \ 34 lpr \ 35 mandoc \ 36 netbsd \ 37 ntp \ 38 ntpevent \ 39 ohash \ 40 opts \ 41 parse \ 42 readline \ 43 sl \ 44 sm \ 45 smdb \ 46 smutil \ 47 telnet \ 48 vers 49 50_LIBRARIES= \ 51 ${_PRIVATELIBS} \ 52 ${_INTERNALIBS} \ 53 alias \ 54 archive \ 55 asn1 \ 56 auditd \ 57 begemot \ 58 bluetooth \ 59 bsdxml \ 60 bsm \ 61 bsnmp \ 62 bz2 \ 63 c \ 64 c_pic \ 65 calendar \ 66 cam \ 67 capsicum \ 68 casper \ 69 com_err \ 70 compiler_rt \ 71 crypt \ 72 crypto \ 73 ctf \ 74 cuse \ 75 cxxrt \ 76 devctl \ 77 devinfo \ 78 devstat \ 79 dialog \ 80 dpv \ 81 dwarf \ 82 edit \ 83 elf \ 84 execinfo \ 85 fetch \ 86 figpar \ 87 geom \ 88 gnuregex \ 89 gpio \ 90 gssapi \ 91 gssapi_krb5 \ 92 hdb \ 93 heimbase \ 94 heimntlm \ 95 heimsqlite \ 96 hx509 \ 97 ipsec \ 98 jail \ 99 kadm5clnt \ 100 kadm5srv \ 101 kafs5 \ 102 kdc \ 103 kiconv \ 104 krb5 \ 105 kvm \ 106 l \ 107 lzma \ 108 m \ 109 magic \ 110 mandoc \ 111 md \ 112 memstat \ 113 mp \ 114 mt \ 115 nandfs \ 116 ncurses \ 117 ncursesw \ 118 netgraph \ 119 ngatm \ 120 nv \ 121 opie \ 122 pam \ 123 pcap \ 124 pcsclite \ 125 pjdlog \ 126 pmc \ 127 proc \ 128 procstat \ 129 pthread \ 130 radius \ 131 readline \ 132 roken \ 133 rpcsec_gss \ 134 rpcsvc \ 135 rt \ 136 sbuf \ 137 sdp \ 138 sm \ 139 smb \ 140 ssl \ 141 ssp_nonshared \ 142 stdthreads \ 143 supcplusplus \ 144 tacplus \ 145 termcapw \ 146 ufs \ 147 ugidfw \ 148 ulog \ 149 usb \ 150 usbhid \ 151 util \ 152 vmmapi \ 153 wind \ 154 wrap \ 155 xo \ 156 y \ 157 ypclnt \ 158 z 159 160_DP_archive= z bz2 lzma bsdxml 161.if ${MK_OPENSSL} != "no" 162_DP_archive+= crypto 163.else 164_DP_archive+= md 165.endif 166_DP_ssl= crypto 167_DP_ssh= crypto crypt 168.if ${MK_LDNS} != "no" 169_DP_ssh+= ldns z 170.endif 171_DP_edit= ncursesw 172.if ${MK_OPENSSL} != "no" 173_DP_bsnmp= crypto 174.endif 175_DP_geom= bsdxml sbuf 176_DP_cam= sbuf 177_DP_casper= capsicum nv pjdlog 178_DP_capsicum= nv 179_DP_pjdlog= util 180_DP_opie= md 181_DP_usb= pthread 182_DP_unbound= pthread 183_DP_rt= pthread 184.if ${MK_OPENSSL} == "no" 185_DP_radius= md 186.else 187_DP_radius= crypto 188.endif 189_DP_procstat= kvm util elf 190.if ${MK_CXX} == "yes" 191.if ${MK_LIBCPLUSPLUS} != "no" 192_DP_proc= cxxrt 193.else 194_DP_proc= supcplusplus 195.endif 196.endif 197.if ${MK_CDDL} != "no" 198_DP_proc+= ctf 199.endif 200_DP_mp= crypto 201_DP_memstat= kvm 202_DP_magic= z 203_DP_mt= bsdxml 204_DP_ldns= crypto 205.if ${MK_OPENSSL} != "no" 206_DP_fetch= ssl crypto 207.else 208_DP_fetch= md 209.endif 210_DP_execinfo= elf 211_DP_dwarf= elf 212_DP_dpv= dialog figpar util 213_DP_dialog= ncursesw m 214_DP_cuse= pthread 215_DP_atf_cxx= atf_c 216_DP_devstat= kvm 217_DP_pam= radius tacplus opie md util 218.if ${MK_KERBEROS} != "no" 219_DP_pam+= krb5 220.endif 221.if ${MK_OPENSSH} != "no" 222_DP_pam+= ssh 223.endif 224.if ${MK_NIS} != "no" 225_DP_pam+= ypclnt 226.endif 227_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ 228 pthread 229_DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err 230_DP_lzma= pthread 231_DP_ucl= m 232_DP_vmmapi= util 233 234# Define spacial cases 235LDADD_supcplusplus= -lsupc++ 236LDADD_atf_c= -L${LIBATF_CDIR} -latf-c 237LDADD_atf_cxx= -L${LIBATF_CXXDIR} -latf-c++ 238 239.for _l in ${_LIBRARIES} 240.if ${_PRIVATELIBS:M${_l}} 241LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} 242.endif 243.if ${_INTERNALIBS:M${_l}} 244LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} 245.endif 246DPADD_${_l}?= ${LIB${_l:tu}} 247LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} 248.if defined(_DP_${_l}) && defined(NO_SHARED) 249.for _d in ${_DP_${_l}} 250DPADD_${_l}+= ${DPADD_${_d}} 251LDADD_${_l}+= ${LDADD_${_d}} 252.endfor 253.endif 254.endfor 255 256DPADD_sqlite3+= ${DPADD_pthread} 257LDADD_sqlite3+= ${LDADD_pthread} 258 259DPADD_atf_cxx+= ${DPADD_atf_c} 260LDADD_atf_cxx+= ${LDADD_atf_c} 261 262DPADD_fifolog+= ${DPADD_z} 263LDADD_fifolog+= ${LDADD_z} 264 265DPADD_ipf+= ${DPADD_kvm} 266LDADD_ipf+= ${LDADD_kvm} 267 268DPADD_mt+= ${DPADD_sbuf} 269LDADD_mt+= ${LDADD_sbuf} 270 271# The following depends on libraries which are using pthread 272DPADD_hdb+= ${DPADD_pthread} 273LDADD_hdb+= ${LDADD_pthread} 274DPADD_kadm5srv+= ${DPADD_pthread} 275LDADD_kadm5srv+= ${LDADD_pthread} 276DPADD_krb5+= ${DPADD_pthread} 277LDADD_krb5+= ${LDADD_pthread} 278DPADD_gssapi_krb5+= ${DPADD_pthread} 279LDADD_gssapi_krb5+= ${LDADD_pthread} 280 281.for _l in ${LIBADD} 282.if ${_PRIVATELIBS:M${_l}} 283USEPRIVATELIB+= ${_l} 284.endif 285DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} 286LDADD+= ${LDADD_${_l}} 287.endfor 288 289.if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} 290.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}". 291.endif 292 293.if defined(USEPRIVATELIB) 294LDFLAGS+= -rpath ${LIBPRIVATEDIR} 295.endif 296 297LIBATF_CDIR= ${ROOTOBJDIR}/lib/atf/libatf-c 298LDATF_C?= ${LIBATF_CDIR}/libatf-c.so 299LIBATF_C?= ${LIBATF_CDIR}/libatf-c.a 300 301LIBATF_CXXDIR= ${ROOTOBJDIR}/lib/atf/libatf-c++ 302LDATF_CXX?= ${LIBATF_CXXDIR}/libatf-c++.so 303LIBATF_CXX?= ${LIBATF_CXXDIR}/libatf-c++.a 304 305LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat 306LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a 307 308LIBELFTCDIR= ${ROOTOBJDIR}/lib/libelftc 309LDELFTC?= ${LIBELFTCDIR}/libelftc.a 310LIBELFTC?= ${LIBELFTCDIR}/libelftc.a 311 312LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent 313LIBEVENT?= ${LIBEVENTDIR}/libevent.a 314 315LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc 316LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a 317 318LIBHEIMIPCSDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcs 319LIBHEIMIPCS?= ${LIBHEIMIPCSDIR}/libheimipcs.a 320 321LIBLDNSDIR= ${ROOTOBJDIR}/lib/libldns 322LIBLDNS?= ${LIBLDNSDIR}/libldns.a 323 324LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh 325LIBSSH?= ${LIBSSHDIR}/libssh.a 326 327LIBUNBOUNDDIR= ${ROOTOBJDIR}/lib/libunbound 328LIBUNBOUND?= ${LIBUNBOUNDDIR}/libunbound.a 329 330LIBUCLDIR= ${ROOTOBJDIR}/lib/libucl 331LIBUCL?= ${LIBUCLDIR}/libucl.a 332 333LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline 334LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a 335 336LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash 337LIBOHASH?= ${LIBOHASHDIR}/libohash.a 338 339LIBSQLITE3DIR= ${ROOTOBJDIR}/lib/libsqlite3 340LIBSQLITE3?= ${LIBSQLITE3DIR}/libsqlite3.a 341 342LIBMANDOCDIR= ${ROOTOBJDIR}/lib/libmandoc 343LIBMANDOC?= ${LIBMANDOCDIR}/libmandoc.a 344 345LIBSMDIR= ${ROOTOBJDIR}/lib/libsm 346LIBSM?= ${LIBSMDIR}/libsm.a 347 348LIBSMDBDIR= ${ROOTOBJDIR}/lib/libsmdb 349LIBSMDB?= ${LIBSMDBDIR}/libsmdb.a 350 351LIBSMUTILDIR= ${ROOTOBJDIR}/lib/libsmutil 352LIBSMUTIL?= ${LIBSMDBDIR}/libsmutil.a 353 354LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd 355LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a 356 357LIBVERSDIR?= ${ROOTOBJDIR}/kerberos5/lib/libvers 358LIBVERS?= ${LIBVERSDIR}/libvers.a 359 360LIBSLDIR= ${ROOTOBJDIR}/kerberos5/lib/libsl 361LIBSL?= ${LIBSLDIR}/libsl.a 362 363LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf 364LIBIPF?= ${LIBIPFDIR}/libipf.a 365 366LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet 367LIBTELNET?= ${LIBIPFDIR}/libtelnet.a 368 369LIBCRONDIR= ${ROOTOBJDIR}/usr.sbin/cron/lib 370LIBCRON?= ${LIBCRONDIR}/libcron.a 371 372LIBNTPDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntp 373LIBNTP?= ${LIBNTPDIR}/libntp.a 374 375LIBNTPEVENTDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntpevent 376LIBNTPEVENT?= ${LIBNTPDIR}/libntpevent.a 377 378LIBOPTSDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libopts 379LIBOTPS?= ${LIBOPTSDIR}/libopts.a 380 381LIBPARSEDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libparse 382LIBPARSE?= ${LIBPARSEDIR}/libparse.a 383 384LIBLPRDIR= ${ROOTOBJDIR}/usr.sbin/lpr/common_source 385LIBLPR?= ${LIBOPTSDIR}/liblpr.a 386 387LIBFIFOLOGDIR= ${ROOTOBJDIR}/usr.sbin/fifolog/lib 388LIBFIFOLOG?= ${LIBOPTSDIR}/libfifolog.a 389 390LIBBSNMPTOOLSDIR= ${ROOTOBJDIR}/usr.sbin/bsnmpd/tools/libbsnmptools 391LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a 392 393LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu 394LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a 395 396