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