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