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