1# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 2# $FreeBSD$ 3# 4 5.include <bsd.init.mk> 6 7.if defined(LIB_CXX) || defined(SHLIB_CXX) 8_LD= ${CXX} 9.else 10_LD= ${CC} 11.endif 12.if defined(LIB_CXX) 13LIB= ${LIB_CXX} 14.endif 15.if defined(SHLIB_CXX) 16SHLIB= ${SHLIB_CXX} 17.endif 18 19LIB_PRIVATE= ${PRIVATELIB:Dprivate} 20# Set up the variables controlling shared libraries. After this section, 21# SHLIB_NAME will be defined only if we are to create a shared library. 22# SHLIB_LINK will be defined only if we are to create a link to it. 23# INSTALL_PIC_ARCHIVE will be defined only if we are to create a PIC archive. 24# BUILD_NOSSP_PIC_ARCHIVE will be defined only if we are to create a PIC archive. 25.if defined(NO_PIC) 26.undef SHLIB_NAME 27.undef INSTALL_PIC_ARCHIVE 28.undef BUILD_NOSSP_PIC_ARCHIVE 29.else 30.if !defined(SHLIB) && defined(LIB) 31SHLIB= ${LIB} 32.endif 33.if !defined(SHLIB_NAME) && defined(SHLIB) && defined(SHLIB_MAJOR) 34SHLIB_NAME= lib${LIB_PRIVATE}${SHLIB}.so.${SHLIB_MAJOR} 35.endif 36.if defined(SHLIB_NAME) && !empty(SHLIB_NAME:M*.so.*) 37SHLIB_LINK?= ${SHLIB_NAME:R} 38.endif 39SONAME?= ${SHLIB_NAME} 40.endif 41 42.if defined(CRUNCH_CFLAGS) 43CFLAGS+= ${CRUNCH_CFLAGS} 44.endif 45 46.if ${MK_ASSERT_DEBUG} == "no" 47CFLAGS+= -DNDEBUG 48NO_WERROR= 49.endif 50 51.if defined(DEBUG_FLAGS) 52CFLAGS+= ${DEBUG_FLAGS} 53 54.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" 55CTFFLAGS+= -g 56.endif 57.else 58STRIP?= -s 59.endif 60 61.if ${SHLIBDIR:M*lib32*} 62TAGS+= lib32 63.endif 64 65.if defined(NO_ROOT) 66.if !defined(TAGS) || ! ${TAGS:Mpackage=*} 67TAGS+= package=${PACKAGE:Uruntime} 68.endif 69TAG_ARGS= -T ${TAGS:[*]:S/ /,/g} 70.endif 71 72.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \ 73 empty(DEBUG_FLAGS:M-gdwarf*) 74CFLAGS+= ${DEBUG_FILES_CFLAGS} 75CXXFLAGS+= ${DEBUG_FILES_CFLAGS} 76CTFFLAGS+= -g 77.endif 78 79.include <bsd.libnames.mk> 80 81# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries 82# .pico used for PIC object files 83# .nossppico used for NOSSP PIC object files 84.SUFFIXES: .out .o .bc .ll .po .pico .nossppico .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln 85 86.if !defined(PICFLAG) 87.if ${MACHINE_CPUARCH} == "sparc64" 88PICFLAG=-fPIC 89.else 90PICFLAG=-fpic 91.endif 92.endif 93 94PO_FLAG=-pg 95 96.c.po: 97 ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} 98 ${CTFCONVERT_CMD} 99 100.c.pico: 101 ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} 102 ${CTFCONVERT_CMD} 103 104.c.nossppico: 105 ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS:C/^-fstack-protector.*$//} ${CFLAGS:C/^-fstack-protector.*$//} -c ${.IMPSRC} -o ${.TARGET} 106 ${CTFCONVERT_CMD} 107 108.cc.po .C.po .cpp.po .cxx.po: 109 ${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} 110 111.cc.pico .C.pico .cpp.pico .cxx.pico: 112 ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} 113 114.cc.nossppico .C.nossppico .cpp.nossppico .cxx.nossppico: 115 ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS:C/^-fstack-protector.*$//} ${CXXFLAGS:C/^-fstack-protector.*$//} -c ${.IMPSRC} -o ${.TARGET} 116 117.f.po: 118 ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} 119 ${CTFCONVERT_CMD} 120 121.f.pico: 122 ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} 123 ${CTFCONVERT_CMD} 124 125.f.nossppico: 126 ${FC} ${PICFLAG} -DPIC ${FFLAGS:C/^-fstack-protector.*$//} -o ${.TARGET} -c ${.IMPSRC} 127 ${CTFCONVERT_CMD} 128 129.s.po .s.pico .s.nossppico: 130 ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} 131 ${CTFCONVERT_CMD} 132 133.asm.po: 134 ${CC:N${CCACHE_BIN}} -x assembler-with-cpp -DPROF ${PO_CFLAGS} \ 135 ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} 136 ${CTFCONVERT_CMD} 137 138.asm.pico: 139 ${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${PICFLAG} -DPIC \ 140 ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} 141 ${CTFCONVERT_CMD} 142 143.asm.nossppico: 144 ${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${PICFLAG} -DPIC \ 145 ${CFLAGS:C/^-fstack-protector.*$//} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} 146 ${CTFCONVERT_CMD} 147 148.S.po: 149 ${CC:N${CCACHE_BIN}} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \ 150 -o ${.TARGET} 151 ${CTFCONVERT_CMD} 152 153.S.pico: 154 ${CC:N${CCACHE_BIN}} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ 155 -c ${.IMPSRC} -o ${.TARGET} 156 ${CTFCONVERT_CMD} 157 158.S.nossppico: 159 ${CC:N${CCACHE_BIN}} ${PICFLAG} -DPIC ${CFLAGS:C/^-fstack-protector.*$//} ${ACFLAGS} \ 160 -c ${.IMPSRC} -o ${.TARGET} 161 ${CTFCONVERT_CMD} 162 163_LIBDIR:=${LIBDIR} 164_SHLIBDIR:=${SHLIBDIR} 165 166.if defined(SHLIB_NAME) 167.if ${MK_DEBUG_FILES} != "no" 168SHLIB_NAME_FULL=${SHLIB_NAME}.full 169# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory 170.if ${_SHLIBDIR} == "/boot" ||\ 171 ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\ 172 ${SHLIBDIR:C%/usr/(tests/)?lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" 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 ${MK_SYMVER} == "yes" && !empty(VERSION_MAP) 190${SHLIB_NAME_FULL}: ${VERSION_MAP} 191LDFLAGS+= -Wl,--version-script=${VERSION_MAP} 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_LIBS= lib${LIB_PRIVATE}${LIB}.a 203 204lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STATICOBJS} 205 @${ECHO} building static ${LIB} library 206 @rm -f ${.TARGET} 207 ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' NMFLAGS='${NMFLAGS}' \ 208 ${LORDER} ${OBJS} ${STATICOBJS} | ${TSORT} ${TSORTFLAGS}` ${ARADD} 209 ${RANLIB} ${RANLIBFLAGS} ${.TARGET} 210.endif 211 212.if !defined(INTERNALLIB) 213 214.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) 215_LIBS+= lib${LIB_PRIVATE}${LIB}_p.a 216POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} 217DEPENDOBJS+= ${POBJS} 218CLEANFILES+= ${POBJS} 219 220lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} 221 @${ECHO} building profiled ${LIB} library 222 @rm -f ${.TARGET} 223 ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' NMFLAGS='${NMFLAGS}' \ 224 ${LORDER} ${POBJS} | ${TSORT} ${TSORTFLAGS}` ${ARADD} 225 ${RANLIB} ${RANLIBFLAGS} ${.TARGET} 226.endif 227 228.if defined(LLVM_LINK) 229lib${LIB_PRIVATE}${LIB}.bc: ${BCOBJS} 230 ${LLVM_LINK} -o ${.TARGET} ${BCOBJS} 231 232lib${LIB_PRIVATE}${LIB}.ll: ${LLOBJS} 233 ${LLVM_LINK} -S -o ${.TARGET} ${LLOBJS} 234 235CLEANFILES+= lib${LIB_PRIVATE}${LIB}.bc lib${LIB_PRIVATE}${LIB}.ll 236.endif 237 238.if defined(SHLIB_NAME) || \ 239 defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) 240SOBJS+= ${OBJS:.o=.pico} 241DEPENDOBJS+= ${SOBJS} 242CLEANFILES+= ${SOBJS} 243.endif 244 245.if defined(SHLIB_NAME) 246_LIBS+= ${SHLIB_NAME} 247 248SOLINKOPTS+= -shared -Wl,-x 249.if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no" 250SOLINKOPTS+= -Wl,--no-fatal-warnings 251.else 252SOLINKOPTS+= -Wl,--fatal-warnings 253.endif 254SOLINKOPTS+= -Wl,--warn-shared-textrel 255 256.if target(beforelinking) 257beforelinking: ${SOBJS} 258${SHLIB_NAME_FULL}: beforelinking 259.endif 260 261.if defined(SHLIB_LINK) 262.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) 263${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT} 264 sed -e 's,@@SHLIB@@,${_SHLIBDIR}/${SHLIB_NAME},g' \ 265 -e 's,@@LIBDIR@@,${_LIBDIR},g' \ 266 ${.ALLSRC} > ${.TARGET} 267 268${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld 269CLEANFILES+= ${SHLIB_LINK:R}.ld 270.endif 271CLEANFILES+= ${SHLIB_LINK} 272.endif 273 274${SHLIB_NAME_FULL}: ${SOBJS} 275 @${ECHO} building shared library ${SHLIB_NAME} 276 @rm -f ${SHLIB_NAME} ${SHLIB_LINK} 277.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no" 278 @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} 279.endif 280 ${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ 281 -o ${.TARGET} -Wl,-soname,${SONAME} \ 282 `NM='${NM}' NMFLAGS='${NMFLAGS}' ${LORDER} ${SOBJS} | \ 283 ${TSORT} ${TSORTFLAGS}` ${LDADD} 284.if ${MK_CTF} != "no" 285 ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} 286.endif 287 288.if ${MK_DEBUG_FILES} != "no" 289CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug 290${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug 291 ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \ 292 ${SHLIB_NAME_FULL} ${.TARGET} 293.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) 294 @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} 295.endif 296 297${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} 298 ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} 299.endif 300.endif #defined(SHLIB_NAME) 301 302.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" 303_LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a 304 305lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} 306 @${ECHO} building special pic ${LIB} library 307 @rm -f ${.TARGET} 308 ${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} 309 ${RANLIB} ${RANLIBFLAGS} ${.TARGET} 310.endif 311 312.if defined(BUILD_NOSSP_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) 313NOSSPSOBJS+= ${OBJS:.o=.nossppico} 314DEPENDOBJS+= ${NOSSPSOBJS} 315CLEANFILES+= ${NOSSPSOBJS} 316_LIBS+= lib${LIB_PRIVATE}${LIB}_nossp_pic.a 317 318lib${LIB_PRIVATE}${LIB}_nossp_pic.a: ${NOSSPSOBJS} 319 @${ECHO} building special nossp pic ${LIB} library 320 @rm -f ${.TARGET} 321 ${AR} ${ARFLAGS} ${.TARGET} ${NOSSPSOBJS} ${ARADD} 322 ${RANLIB} ${RANLIBFLAGS} ${.TARGET} 323.endif 324 325.endif # !defined(INTERNALLIB) 326 327.if defined(_SKIP_BUILD) 328all: 329.else 330.if defined(_LIBS) && !empty(_LIBS) 331all: ${_LIBS} 332.endif 333 334.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) 335all: all-man 336.endif 337.endif 338 339CLEANFILES+= ${_LIBS} 340 341_EXTRADEPEND: 342.if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) 343.if defined(DPADD) && !empty(DPADD) 344 echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE} 345.endif 346.endif 347 348.if !target(install) 349 350.if defined(PRECIOUSLIB) 351.if !defined(NO_FSCHG) 352SHLINSTALLFLAGS+= -fschg 353.endif 354.endif 355# Install libraries with -S to avoid risk of modifying in-use libraries when 356# installing to a running system. It is safe to avoid this for NO_ROOT builds 357# that are only creating an image. 358.if !defined(NO_SAFE_LIBINSTALL) && !defined(NO_ROOT) 359SHLINSTALLFLAGS+= -S 360.endif 361 362_INSTALLFLAGS:= ${INSTALLFLAGS} 363.for ie in ${INSTALLFLAGS_EDIT} 364_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} 365.endfor 366_SHLINSTALLFLAGS:= ${SHLINSTALLFLAGS} 367.for ie in ${INSTALLFLAGS_EDIT} 368_SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} 369.endfor 370 371.if !defined(INTERNALLIB) 372realinstall: _libinstall 373.ORDER: beforeinstall _libinstall 374_libinstall: 375.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" 376 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 377 ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/ 378.endif 379.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) 380 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},profile} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 381 ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/ 382.endif 383.if defined(SHLIB_NAME) 384 ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 385 ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ 386 ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/ 387.if ${MK_DEBUG_FILES} != "no" 388.if defined(DEBUGMKDIR) 389 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/ 390.endif 391 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \ 392 ${_INSTALLFLAGS} \ 393 ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/ 394.endif 395.if defined(SHLIB_LINK) 396.if commands(${SHLIB_LINK:R}.ld) 397 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 398 ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ 399 ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 400.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} 401 ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} 402.endfor 403.else 404.if ${_SHLIBDIR} == ${_LIBDIR} 405.if ${SHLIB_LINK:Mlib*} 406 ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 407.else 408 ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ 409 ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 410.endif 411.else 412.if ${SHLIB_LINK:Mlib*} 413 ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ 414 ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 415.else 416 ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ 417 ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 418.endif 419.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME}) 420 -chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME} 421 rm -f ${DESTDIR}${_LIBDIR}/${SHLIB_NAME} 422.endif 423.endif 424.endif # SHLIB_LDSCRIPT 425.endif # SHLIB_LINK 426.endif # SHIB_NAME 427.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" 428 ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 429 ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ 430.endif 431.endif # !defined(INTERNALLIB) 432 433.if !defined(LIBRARIES_ONLY) 434.include <bsd.nls.mk> 435.include <bsd.confs.mk> 436.include <bsd.files.mk> 437.include <bsd.incs.mk> 438.endif 439 440LINKOWN?= ${LIBOWN} 441LINKGRP?= ${LIBGRP} 442LINKMODE?= ${LIBMODE} 443SYMLINKOWN?= ${LIBOWN} 444SYMLINKGRP?= ${LIBGRP} 445.include <bsd.links.mk> 446 447.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) 448realinstall: maninstall 449.ORDER: beforeinstall maninstall 450.endif 451 452.endif 453 454.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) 455.include <bsd.man.mk> 456.endif 457 458.if defined(LIB) && !empty(LIB) 459OBJS_DEPEND_GUESS+= ${SRCS:M*.h} 460.for _S in ${SRCS:N*.[hly]} 461OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.po+= ${_S} 462.endfor 463.endif 464.if defined(SHLIB_NAME) || \ 465 defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) 466.for _S in ${SRCS:N*.[hly]} 467OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.pico+= ${_S} 468.endfor 469.endif 470.if defined(BUILD_NOSSP_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) 471.for _S in ${SRCS:N*.[hly]} 472OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.nossppico+= ${_S} 473.endfor 474.endif 475 476.if defined(HAS_TESTS) 477MAKE+= MK_MAKE_CHECK_USE_SANDBOX=yes 478SUBDIR_TARGETS+= check 479TESTS_LD_LIBRARY_PATH+= ${.OBJDIR} 480.endif 481 482.include <bsd.dep.mk> 483.include <bsd.clang-analyze.mk> 484.include <bsd.obj.mk> 485.include <bsd.sys.mk> 486