aboutsummaryrefslogtreecommitdiff
path: root/share/mk/src.libnames.mk
blob: ff4561ae04c80334f59ffd6db540711c7f80a68e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# $FreeBSD$
#
# The include file <src.libnames.mk> define library names suitable
# for INTERNALLIB and PRIVATELIB definition

.if !target(__<bsd.init.mk>__)
.error src.libnames.mk cannot be included directly.
.endif

.include <src.opts.mk>

ROOTSRCDIR=	${.MAKE.MAKEFILES:M*/src.libnames.mk:H:H:H}
ROOTOBJDIR=	${.OBJDIR:S/${.CURDIR}//}${ROOTSRCDIR}
_PRIVATELIBS=	\
		atf_c \
		atf_cxx \
		bsdstat \
		heimipcc \
		heimipcs \
		ldns \
		sqlite3 \
		ssh \
		ucl \
		unbound

_INTERNALIBS=	\
		event \
		mandoc \
		netbsd \
		ohash \
		readline \
		sl \
		sm \
		vers

_LIBRARIES=	\
		${_PRIVATELIBS} \
		${_INTERNALIBS} \
		alias \
		archive \
		asn1 \
		bsdxml \
		bsnmp \
		bz2 \
		cam \
		capsicum \
		casper \
		ctf \
		com_err \
		crypt \
		crypto \
		cuse \
		cxxrt \
		devstat \
		dialog \
		dpv \
		dwarf \
		edit \
		elf \
		execinfo \
		fetch \
		figpar \
		geom \
		gssapi \
		hdb \
		heimbase \
		heimntlm \
		heimsqlite \
		hx509 \
		ipsec \
		jail \
		kadm5clnt \
		kadm5srv \
		kafs5 \
		kdc \
		kiconv \
		krb5 \
		kvm \
		krb5 \
		l \
		lzma \
		m \
		magic \
		mandoc \
		md \
		memstat \
		mp \
		nandfs \
		ncursesw \
		nv \
		opie \
		pam \
		pcap \
		pjdlog \
		proc \
		procstat \
		pthread \
		radius \
		readline \
		roken \
		rpcsec_gss \
		rt \
		sbuf \
		sm \
		smb \
		ssl \
		stdthreads \
		supcplusplus \
		tacplus \
		termcapw \
		ufs \
		ulog \
		usb \
		util \
		wind \
		wrap \
		y \
		z

_DP_archive=	z bz2 lzma bsdxml
.if ${MK_OPENSSL} != "no"
_DP_archive+=	crypto
.else
_DP_archive+=	md
.endif
_DP_ssl=	crypto
_DP_ssh=	crypto crypt
_DP_edit=	edit
.if ${MK_OPENSSL} != "no"
_DP_bsnmp=	crypto
.endif
_DP_grom=	bsdxml sbuf
_DP_cam=	sbuf
_DP_casper=	capsicum nv pjdlog
_DP_capsicum=	nv
_DP_pjdlog=	util
_DP_opie=	md
_DP_usb=	pthread
_DP_unbound=	pthread
_DP_rt=	pthread
.if ${MK_OPENSSL} == "no"
_DP_radius=	md
.else
_DP_radius=	crypto
.endif
_DP_procstat=	kvm util elf
.if ${MK_CXX} == "yes"
.if ${MK_LIBCPLUSPLUS} != "no"
_DP_proc=	cxxrt
.else
_DP_proc=	supcplusplus
.endif
.endif
.if ${MK_CDDL} != "no"
_DP_proc+=	ctf
.endif
_DP_mp=	crypto
_DP_memstat=	kvm
_DP_magic=	z
_DP_ldns=	crypto
.if ${MK_OPENSSL} != "no"
_DP_fetch=	ssl crypto
.else
_DP_fetch=	md
.endif
_DP_execinfo=	elf
_DP_dwarf=	elf
_DP_dpv=	dialog figpar util
_DP_dialog=	ncursesw m
_DP_cuse=	pthread
_DP_atf_cxx=	atf_c
_DP_devstat=	kvm

# Define spacial cases
LDADD_supcplusplus=	-lsupc++
LDADD_atf_c=	-L${LIBATF_CDIR} -latf-c
LDADD_atf_cxx=	-L${LIBATF_CXXDIR} -latf-c++

.for _l in ${_LIBRARIES}
.if ${_PRIVATELIBS:M${_l}}
LDADD_${_l}_L+=		-L${LIB${_l:tu}DIR}
.endif
.if ${_INTERNALIBS:M${_l}}
LDADD_${_l}_L+=		-L${LIB${_l:tu}DIR}
.endif
DPADD_${_l}?=	${LIB${_l:tu}}
LDADD_${_l}?=	${LDADD_${_l}_L} -l${_l}
.if defined(_DP_${_l}) && defined(NO_SHARED)
.for _d in ${_DP_${_l}}
DPADD_${_l}+=	${DPADD_${_d}}
LDADD_${_l}+=	${LDADD_${_d}}
.endfor
.endif
.endfor

# ucl needs and exposes libm
DPADD_ucl+=	${DPADD_m}
LDADD_ucl+=	${LDADD_m}

DPADD_sqlite3+=	${DPADD_pthread}
LDADD_sqlite3+=	${LDADD_pthread}

DPADD_atf_cxx+=	${DPADD_atf_c}
LDADD_atf_cxx+=	${LDADD_atf_c}

# The following depends on libraries which are using pthread
DPADD_hdb+=	${DPADD_pthread}
LDADD_hdb+=	${LDADD_pthread}
DPADD_kadm5srv+=	${DPADD_pthread}
LDADD_kadm5srv+=	${LDADD_pthread}

.for _l in ${LIBADD}
.if ${_PRIVATELIBS:M${_l}}
USEPRIVATELIB+=	${_l}
.endif
DPADD+=		${DPADD_${_l}}
LDADD+=		${LDADD_${_l}}
.endfor

.if defined(USEPRIVATELIB)
LDFLAGS+=	-rpath ${LIBPRIVATEDIR}
.endif

LIBATF_CDIR=	${ROOTOBJDIR}/lib/atf/libatf-c
LDATF_C?=	${LIBATF_CDIR}/libatf-c.so
LIBATF_C?=	${LIBATF_CDIR}/libatf-c.a

LIBATF_CXXDIR=	${ROOTOBJDIR}/lib/atf/libatf-c++
LDATF_CXX?=	${LIBATF_CXXDIR}/libatf-c++.so
LIBATF_CXX?=	${LIBATF_CXXDIR}/libatf-c++.a

LIBBSDSTATDIR=	${ROOTOBJDIR}/lib/libbsdstat
LDBSDSTAT?=	${LIBBSDSTATDIR}/libbsdstat.so
LIBBSDSTAT?=	${LIBBSDSTATDIR}/libbsdstat.a

LIBEVENTDIR=	${ROOTOBJDIR}/lib/libevent
LDEVENT?=	${LIBEVENTDIR}/libevent.a
LIBEVENT?=	${LIBEVENTDIR}/libevent.a

LIBHEIMIPCCDIR=	${ROOTOBJDIR}/kerberos5/lib/libheimipcc
LDHEIMIPCC?=	${LIBHEIMIPCCDIR}/libheimipcc.so
LIBHEIMIPCC?=	${LIBHEIMIPCCDIR}/libheimipcc.a

LIBHEIMIPCSDIR=	${ROOTOBJDIR}/kerberos5/lib/libheimipcs
LDHEIMIPCS?=	${LIBHEIMIPCSDIR}/libheimipcs.so
LIBHEIMIPCS?=	${LIBHEIMIPCSDIR}/libheimipcs.a

LIBLDNSDIR=	${ROOTOBJDIR}/lib/libldns
LDLDNS?=	${LIBLDNSDIR}/libldns.so
LIBLDNS?=	${LIBLDNSDIR}/libldns.a

LIBSSHDIR=	${ROOTOBJDIR}/secure/lib/libssh
LDSSH?=		${LIBSSHDIR}/libssh.so
LIBSSH?=	${LIBSSHDIR}/libssh.a

LIBUNBOUNDDIR=	${ROOTOBJDIR}/lib/libunbound
LDUNBOUND?=	${LIBUNBOUNDDIR}/libunbound.so
LIBUNBOUND?=	${LIBUNBOUNDDIR}/libunbound.a

LIBUCLDIR=	${ROOTOBJDIR}/lib/libucl
LDUCL?=		${LIBUCLDIR}/libucl.so
LIBUCL?=	${LIBUCLDIR}/libucl.a

LIBREADLINEDIR=	${ROOTOBJDIR}/gnu/lib/libreadline/readline
LDREADLINE?=	${LIBREADLINEDIR}/libreadline.a
LIBREADLINE?=	${LIBREADLINEDIR}/libreadline.a

LIBOHASHDIR=	${ROOTOBJDIR}/lib/libohash
LDOHASH?=	${LIBOHASHDIR}/libohash.a
LIBOHASH?=	${LIBOHASHDIR}/libohash.a

LIBSQLITE3DIR=	${ROOTOBJDIR}/lib/libsqlite3
LDSQLITE3?=	${LIBSQLITE3DIR}/libsqlite3.so
LIBSQLITE3?=	${LIBSQLITE3DIR}/libsqlite3.a

LIBMANDOCDIR=	${ROOTOBJDIR}/lib/libmandoc
LIBMANDOC?=	${LIBMANDOCDIR}/libmandoc.a

LIBSMDIR=	${ROOTOBJDIR}/lib/libsm
LDSM?=		${LIBSMDIR}/libsm.a
LIBSM?=		${LIBSMDIR}/libsm.a

LIBNETBSDDIR?=	${ROOTOBJDIR}/lib/libnetbsd
LIBNETBSD?=	${LIBNETBSDDIR}/libnetbsd.a

LIBVERSDIR?=	${ROOTOBJDIR}/kerberos5/lib/libvers
LIBVERS?=	${LIBVERSDIR}/libvers.a

LIBSLDIR=	${ROOTOBJDIR}/kerberos5/lib/libsl
LIBSL?=		${LIBSLDIR}/libsl.a