xref: /freebsd/share/mk/bsd.lib.mk (revision 7e97c6adffde3bd6f60f042ed2603335c005c6a7)
1.include <bsd.init.mk>
2.include <bsd.compiler.mk>
3.include <bsd.linker.mk>
4.include <bsd.compat.pre.mk>
5
6__<bsd.lib.mk>__:	.NOTMAIN
7
8.if defined(LIB_CXX) || defined(SHLIB_CXX)
9_LD=	${CXX}
10.else
11_LD=	${CC}
12.endif
13.if defined(LIB_CXX)
14LIB=	${LIB_CXX}
15.endif
16.if defined(SHLIB_CXX)
17SHLIB=	${SHLIB_CXX}
18.endif
19
20LIB_PRIVATE=	${PRIVATELIB:Dprivate}
21# Set up the variables controlling shared libraries.  After this section,
22# SHLIB_NAME will be defined only if we are to create a shared library.
23# SHLIB_LINK will be defined only if we are to create a link to it.
24# INSTALL_PIC_ARCHIVE will be defined only if we are to create a PIC archive.
25# BUILD_NOSSP_PIC_ARCHIVE will be defined only if we are to create a PIC archive.
26.if defined(NO_PIC)
27.undef SHLIB_NAME
28.undef INSTALL_PIC_ARCHIVE
29.undef BUILD_NOSSP_PIC_ARCHIVE
30.else
31.if !defined(SHLIB) && defined(LIB)
32SHLIB=		${LIB}
33.endif
34.if !defined(SHLIB_NAME) && defined(SHLIB) && defined(SHLIB_MAJOR)
35SHLIB_NAME=	lib${LIB_PRIVATE}${SHLIB}.so.${SHLIB_MAJOR}
36.endif
37.if defined(SHLIB_NAME) && !empty(SHLIB_NAME:M*.so.*)
38SHLIB_LINK?=	${SHLIB_NAME:R}
39.endif
40SONAME?=	${SHLIB_NAME}
41.endif
42
43.if defined(CRUNCH_CFLAGS)
44CFLAGS+=	${CRUNCH_CFLAGS}
45.endif
46
47.for _libcompat in ${_ALL_libcompats}
48.if ${SHLIBDIR:M*/lib${_libcompat}} || ${SHLIBDIR:M*/lib${_libcompat}/*}
49TAGS+=	lib${_libcompat}
50.endif
51.endfor
52
53.if defined(NO_ROOT)
54.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
55TAGS+=	package=${PACKAGE:Uutilities}
56.endif
57
58# By default, if PACKAGE=foo, then the native runtime libraries will go into
59# the FreeBSD-foo package, and subpackages will be created for -dev, -lib32,
60# and so on.  If LIB_PACKAGE is set, then we also create a subpackage for
61# runtime libraries with a -lib suffix.  This is used when a package has
62# libraries and some other content (e.g., executables) to allow consumers to
63# depend on the libraries.
64.if defined(LIB_PACKAGE) && ! ${TAGS:Mlib*}
65.if !defined(PACKAGE)
66.error LIB_PACKAGE cannot be used without PACKAGE
67.endif
68
69LIB_TAG_ARGS=	${TAG_ARGS},lib
70.else
71LIB_TAG_ARGS=	${TAG_ARGS}
72.endif
73
74TAG_ARGS=	-T ${TAGS:ts,:[*]}
75
76DBG_TAG_ARGS=	${TAG_ARGS},dbg
77DEV_TAG_ARGS=	${TAG_ARGS},dev
78.endif	# !defined(NO_ROOT)
79
80# ELF hardening knobs
81.if ${MK_BIND_NOW} != "no"
82LDFLAGS+= -Wl,-znow
83.endif
84.if ${LINKER_TYPE} != "mac"
85.if ${MK_RELRO} == "no"
86LDFLAGS+= -Wl,-znorelro
87.else
88LDFLAGS+= -Wl,-zrelro
89.endif
90.endif
91.if ${MK_RETPOLINE} != "no"
92.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline}
93CFLAGS+= -mretpoline
94CXXFLAGS+= -mretpoline
95LDFLAGS+= -Wl,-zretpolineplt
96.else
97.warning Retpoline requested but not supported by compiler or linker
98.endif
99.endif
100# LLD sensibly defaults to -znoexecstack, so do the same for BFD
101LDFLAGS.bfd+= -Wl,-znoexecstack
102.if ${MK_BRANCH_PROTECTION} != "no"
103CFLAGS+=  -mbranch-protection=standard
104.if ${LINKER_FEATURES:Mbti-report} && defined(BTI_REPORT_ERROR)
105LDFLAGS+= -Wl,-zbti-report=error
106.endif
107.endif
108
109# Initialize stack variables on function entry
110.if ${OPT_INIT_ALL} != "none"
111.if ${COMPILER_FEATURES:Minit-all}
112CFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL}
113CXXFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL}
114.if ${OPT_INIT_ALL} == "zero" && ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000
115CFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
116CXXFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
117.endif
118.else
119.warning INIT_ALL (${OPT_INIT_ALL}) requested but not supported by compiler
120.endif
121.endif
122
123# Zero used registers on return (mitigate some ROP)
124.if ${MK_ZEROREGS} != "no"
125.if ${COMPILER_FEATURES:Mzeroregs}
126ZEROREG_TYPE?= used
127CFLAGS+= -fzero-call-used-regs=${ZEROREG_TYPE}
128CXXFLAGS+= -fzero-call-used-regs=${ZEROREG_TYPE}
129.endif
130.endif
131
132# bsd.sanitizer.mk is not installed, so don't require it (e.g. for ports).
133.sinclude "bsd.sanitizer.mk"
134
135.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == ""
136CFLAGS += -mno-relax
137.endif
138
139.include <bsd.libnames.mk>
140
141.include <bsd.suffixes-extra.mk>
142
143_LIBDIR:=${LIBDIR}
144_SHLIBDIR:=${SHLIBDIR}
145
146.if defined(SHLIB_NAME)
147.if ${MK_DEBUG_FILES} != "no"
148SHLIB_NAME_FULL=${SHLIB_NAME}.full
149DEBUGFILE= ${SHLIB_NAME}.debug
150# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
151.if ${_SHLIBDIR} == "/boot" ||\
152    ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\
153    ${SHLIBDIR:C%/usr/lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" ||\
154    ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests"
155DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR}
156.else
157DEBUGFILEDIR=${_SHLIBDIR}/.debug
158.endif
159.if !exists(${DESTDIR}${DEBUGFILEDIR})
160DEBUGMKDIR=
161.endif
162.else
163SHLIB_NAME_FULL=${SHLIB_NAME}
164.endif
165.endif
166
167.include <bsd.symver.mk>
168
169# Allow libraries to specify their own version map or have it
170# automatically generated (see bsd.symver.mk above).
171.if !empty(VERSION_MAP)
172${SHLIB_NAME_FULL}:	${VERSION_MAP}
173LDFLAGS+=	-Wl,--version-script=${VERSION_MAP}
174
175# Ideally we'd always enable --no-undefined-version (default for lld >= 16),
176# but we have several symbols in our version maps that may or may not exist,
177# depending on compile-time defines and that needs to be handled first.
178.if ${MK_UNDEFINED_VERSION} == "no"
179LDFLAGS+=	-Wl,--no-undefined-version
180.else
181LDFLAGS+=	-Wl,--undefined-version
182.endif
183.endif
184
185.if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
186OBJS+=		${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/}
187BCOBJS+=	${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g}
188LLOBJS+=	${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g}
189CLEANFILES+=	${OBJS} ${BCOBJS} ${LLOBJS} ${STATICOBJS}
190.endif
191
192.if defined(LIB) && !empty(LIB)
193.if defined(STATIC_LDSCRIPT)
194_STATICLIB_SUFFIX=	_real
195.endif
196_LIBS=		lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a
197
198lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a: ${OBJS} ${STATICOBJS}
199	@${ECHO} Building static ${LIB} library
200	@rm -f ${.TARGET}
201	${AR} ${ARFLAGS} ${.TARGET} ${OBJS} ${STATICOBJS} ${ARADD}
202.endif
203
204.if !defined(INTERNALLIB)
205
206.if defined(LLVM_LINK)
207lib${LIB_PRIVATE}${LIB}.bc: ${BCOBJS}
208	${LLVM_LINK} -o ${.TARGET} ${BCOBJS}
209
210lib${LIB_PRIVATE}${LIB}.ll: ${LLOBJS}
211	${LLVM_LINK} -S -o ${.TARGET} ${LLOBJS}
212
213CLEANFILES+=	lib${LIB_PRIVATE}${LIB}.bc lib${LIB_PRIVATE}${LIB}.ll
214.endif
215
216.if defined(SHLIB_NAME) || \
217    defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
218SOBJS+=		${OBJS:.o=.pico}
219DEPENDOBJS+=	${SOBJS}
220CLEANFILES+=	${SOBJS}
221.endif
222
223.if defined(SHLIB_NAME)
224_LIBS+=		${SHLIB_NAME}
225
226SOLINKOPTS+=	-shared -Wl,-x
227.if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no"
228SOLINKOPTS+=	-Wl,--no-fatal-warnings
229.else
230SOLINKOPTS+=	-Wl,--fatal-warnings
231.endif
232SOLINKOPTS+=	-Wl,--warn-shared-textrel
233
234.if target(beforelinking)
235beforelinking: ${SOBJS}
236${SHLIB_NAME_FULL}: beforelinking
237.endif
238
239.if defined(SHLIB_LINK)
240.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT})
241${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT}
242	sed -e 's,@@SHLIB@@,${_SHLIBDIR}/${SHLIB_NAME},g' \
243	    -e 's,@@LIBDIR@@,${_LIBDIR},g' \
244	    ${.ALLSRC} > ${.TARGET}
245
246${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld
247CLEANFILES+=	${SHLIB_LINK:R}.ld
248.endif
249CLEANFILES+=	${SHLIB_LINK}
250.endif
251
252${SHLIB_NAME_FULL}: ${SOBJS}
253	@${ECHO} Building shared library ${SHLIB_NAME}
254	@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
255.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no"
256	# Note: This uses ln instead of ${INSTALL_LIBSYMLINK} since we are in OBJDIR
257	@${LN:Uln} -fs ${SHLIB_NAME} ${SHLIB_LINK}
258.endif
259	${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
260	    -o ${.TARGET} -Wl,-soname,${SONAME} ${SOBJS} ${LDADD}
261.if ${MK_CTF} != "no"
262	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
263.endif
264
265.if ${MK_DEBUG_FILES} != "no"
266CLEANFILES+=	${SHLIB_NAME_FULL} ${DEBUGFILE}
267${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${DEBUGFILE}
268	${OBJCOPY} --strip-debug --add-gnu-debuglink=${DEBUGFILE} \
269	    ${SHLIB_NAME_FULL} ${.TARGET}
270.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
271	# Note: This uses ln instead of ${INSTALL_LIBSYMLINK} since we are in OBJDIR
272	@${LN:Uln} -fs ${SHLIB_NAME} ${SHLIB_LINK}
273.endif
274
275${DEBUGFILE}: ${SHLIB_NAME_FULL}
276	${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET}
277.endif
278.endif #defined(SHLIB_NAME)
279
280.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
281_LIBS+=		lib${LIB_PRIVATE}${LIB}_pic.a
282
283lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS}
284	@${ECHO} Building special pic ${LIB} library
285	@rm -f ${.TARGET}
286	${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD}
287.endif
288
289.if defined(BUILD_NOSSP_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
290NOSSPSOBJS+=	${OBJS:.o=.nossppico}
291DEPENDOBJS+=	${NOSSPSOBJS}
292CLEANFILES+=	${NOSSPSOBJS}
293_LIBS+=		lib${LIB_PRIVATE}${LIB}_nossp_pic.a
294
295lib${LIB_PRIVATE}${LIB}_nossp_pic.a: ${NOSSPSOBJS}
296	@${ECHO} Building special nossp pic ${LIB} library
297	@rm -f ${.TARGET}
298	${AR} ${ARFLAGS} ${.TARGET} ${NOSSPSOBJS} ${ARADD}
299.endif
300
301.endif # !defined(INTERNALLIB)
302
303.if defined(INTERNALLIB) && ${MK_PIE} != "no" && defined(LIB) && !empty(LIB)
304PIEOBJS+=	${OBJS:.o=.pieo}
305DEPENDOBJS+=	${PIEOBJS}
306CLEANFILES+=	${PIEOBJS}
307
308_LIBS+=		lib${LIB_PRIVATE}${LIB}_pie.a
309
310lib${LIB_PRIVATE}${LIB}_pie.a: ${PIEOBJS}
311	@${ECHO} Building pie ${LIB} library
312	@rm -f ${.TARGET}
313	${AR} ${ARFLAGS} ${.TARGET} ${PIEOBJS} ${ARADD}
314.endif
315
316.if defined(_SKIP_BUILD)
317all:
318.else
319.if defined(_LIBS) && !empty(_LIBS)
320all: ${_LIBS}
321.endif
322
323.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
324all: all-man
325.endif
326.endif
327
328CLEANFILES+=	${_LIBS}
329
330_EXTRADEPEND:
331.if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME)
332.if defined(DPADD) && !empty(DPADD)
333	echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE}
334.endif
335.endif
336
337.if !target(install)
338
339INSTALLFLAGS+= -C
340.if defined(PRECIOUSLIB)
341.if !defined(NO_FSCHG)
342SHLINSTALLFLAGS+= -fschg
343.endif
344.endif
345# Install libraries with -S to avoid risk of modifying in-use libraries when
346# installing to a running system.  It is safe to avoid this for NO_ROOT builds
347# that are only creating an image.
348#
349# XXX: Since Makefile.inc1 ends up building lib/libc both as part of
350# _startup_libs and as part of _generic_libs it ends up getting installed a
351# second time during the parallel build, and although the .WAIT in lib/Makefile
352# stops that mattering for lib, other directories like secure/lib are built in
353# parallel at the top level and are unaffected by that, so can sometimes race
354# with the libc.so.7 reinstall and see a missing or corrupt file. Ideally the
355# build system would be fixed to not build/install libc to WORLDTMP the second
356# time round, but for now using -S ensures the install is atomic and thus we
357# never see a broken intermediate state, so use it even for NO_ROOT builds.
358.if !defined(NO_SAFE_LIBINSTALL) #&& !defined(NO_ROOT)
359SHLINSTALLFLAGS+= -S
360SHLINSTALLSYMLINKFLAGS+= -S
361.endif
362
363_INSTALLFLAGS:=	${INSTALLFLAGS}
364.for ie in ${INSTALLFLAGS_EDIT}
365_INSTALLFLAGS:=	${_INSTALLFLAGS${ie}}
366.endfor
367_SHLINSTALLFLAGS:=	${SHLINSTALLFLAGS}
368_SHLINSTALLSYMLINKFLAGS:= ${SHLINSTALLSYMLINKFLAGS}
369.for ie in ${INSTALLFLAGS_EDIT}
370_SHLINSTALLFLAGS:=	${_SHLINSTALLFLAGS${ie}}
371.endfor
372
373.if defined(PCFILES)
374.for pcfile in ${PCFILES}
375installpcfiles: installpcfiles-${pcfile}
376
377installpcfiles-${pcfile}: ${pcfile}
378	${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
379	    ${_INSTALLFLAGS} \
380	    ${.ALLSRC} ${DESTDIR}${LIBDATADIR}/pkgconfig/
381.endfor
382.endif
383installpcfiles: .PHONY
384
385.if !defined(INTERNALLIB)
386realinstall: _libinstall installpcfiles _debuginstall
387.ORDER: beforeinstall _libinstall _debuginstall
388_libinstall:
389.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
390	${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
391	    ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a ${DESTDIR}${_LIBDIR}/
392.endif
393.if defined(SHLIB_NAME)
394	${INSTALL} ${LIB_TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
395	    ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
396	    ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
397.if defined(SHLIB_LINK)
398.if commands(${SHLIB_LINK:R}.ld)
399	${INSTALL} ${DEV_TAG_ARGS} -S -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
400	    ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \
401	    ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
402.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS}
403	${INSTALL_LIBSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
404	    ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
405.endfor
406.else
407.if ${_SHLIBDIR} == ${_LIBDIR}
408.if ${SHLIB_LINK:Mlib*}
409	${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${DEV_TAG_ARGS} \
410	    ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
411.else
412	${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
413	    ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
414	    ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
415.endif
416.else
417.if ${SHLIB_LINK:Mlib*}
418	${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${DEV_TAG_ARGS} \
419	    ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
420.else
421	${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
422	    ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
423.endif
424.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
425	-chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
426	rm -f ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
427.endif
428.endif # _SHLIBDIR == _LIBDIR
429.endif # SHLIB_LDSCRIPT
430.endif # SHLIB_LINK
431.endif # SHIB_NAME
432.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
433	${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
434	    ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
435.endif
436.endif # !defined(INTERNALLIB)
437
438.if !defined(LIBRARIES_ONLY)
439.include <bsd.nls.mk>
440.include <bsd.confs.mk>
441.include <bsd.files.mk>
442#No need to install header for INTERNALLIB
443.if !defined(INTERNALLIB)
444.include <bsd.incs.mk>
445.endif
446.endif
447
448LINKOWN?=	${LIBOWN}
449LINKGRP?=	${LIBGRP}
450LINKMODE?=	${LIBMODE}
451SYMLINKOWN?=	${LIBOWN}
452SYMLINKGRP?=	${LIBGRP}
453LINKTAGS=	dev${_COMPAT_TAG}
454.include <bsd.links.mk>
455
456.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
457realinstall: maninstall
458.ORDER: beforeinstall maninstall
459.endif
460
461.endif
462
463.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
464.include <bsd.man.mk>
465.endif
466
467.if defined(LIB) && !empty(LIB)
468OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
469.endif
470.if defined(SHLIB_NAME) || \
471    defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
472.for _S in ${SRCS:N*.[hly]}
473OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.pico+=	${_S}
474.endfor
475.endif
476.if defined(BUILD_NOSSP_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
477.for _S in ${SRCS:N*.[hly]}
478OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.nossppico+=	${_S}
479.endfor
480.endif
481
482.if defined(HAS_TESTS)
483MAKE+=			MK_MAKE_CHECK_USE_SANDBOX=yes
484SUBDIR_TARGETS+=	check
485TESTS_LD_LIBRARY_PATH+=	${.OBJDIR}
486.endif
487
488.include <bsd.debug.mk>
489.include <bsd.dep.mk>
490.include <bsd.clang-analyze.mk>
491.include <bsd.obj.mk>
492.include <bsd.sys.mk>
493