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