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