Changeset View
Changeset View
Standalone View
Standalone View
head/share/mk/bsd.lib.mk
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
CLEANFILES+= ${SHLIB_LINK} | CLEANFILES+= ${SHLIB_LINK} | ||||
.endif | .endif | ||||
${SHLIB_NAME_FULL}: ${SOBJS} | ${SHLIB_NAME_FULL}: ${SOBJS} | ||||
@${ECHO} building shared library ${SHLIB_NAME} | @${ECHO} building shared library ${SHLIB_NAME} | ||||
@rm -f ${SHLIB_NAME} ${SHLIB_LINK} | @rm -f ${SHLIB_NAME} ${SHLIB_LINK} | ||||
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no" | .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no" | ||||
@${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} | @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} | ||||
.endif | .endif | ||||
${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ | ${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ | ||||
-o ${.TARGET} -Wl,-soname,${SONAME} \ | -o ${.TARGET} -Wl,-soname,${SONAME} \ | ||||
`NM='${NM}' NMFLAGS='${NMFLAGS}' ${LORDER} ${SOBJS} | \ | `NM='${NM}' NMFLAGS='${NMFLAGS}' ${LORDER} ${SOBJS} | \ | ||||
${TSORT} ${TSORTFLAGS}` ${LDADD} | ${TSORT} ${TSORTFLAGS}` ${LDADD} | ||||
.if ${MK_CTF} != "no" | .if ${MK_CTF} != "no" | ||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} | ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} | ||||
.endif | .endif | ||||
.if ${MK_DEBUG_FILES} != "no" | .if ${MK_DEBUG_FILES} != "no" | ||||
CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug | CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug | ||||
${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug | ${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug | ||||
${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \ | ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \ | ||||
${SHLIB_NAME_FULL} ${.TARGET} | ${SHLIB_NAME_FULL} ${.TARGET} | ||||
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) | .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) | ||||
@${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} | @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} | ||||
.endif | .endif | ||||
${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} | ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} | ||||
${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} | ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} | ||||
.endif | .endif | ||||
.endif #defined(SHLIB_NAME) | .endif #defined(SHLIB_NAME) | ||||
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" | .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \ | ||||
${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/ | ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/ | ||||
.endif | .endif | ||||
.if defined(SHLIB_LINK) | .if defined(SHLIB_LINK) | ||||
.if commands(${SHLIB_LINK:R}.ld) | .if commands(${SHLIB_LINK:R}.ld) | ||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ | ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ | ||||
${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ | ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ | ||||
${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | ||||
.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} | .for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} | ||||
${INSTALL_SYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} | ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} | ||||
.endfor | .endfor | ||||
.else | .else | ||||
.if ${_SHLIBDIR} == ${_LIBDIR} | .if ${_SHLIBDIR} == ${_LIBDIR} | ||||
.if ${SHLIB_LINK:Mlib*} | .if ${SHLIB_LINK:Mlib*} | ||||
${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | ||||
.else | .else | ||||
${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ | ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ | ||||
${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | ||||
Show All 22 Lines | |||||
.if !defined(LIBRARIES_ONLY) | .if !defined(LIBRARIES_ONLY) | ||||
.include <bsd.nls.mk> | .include <bsd.nls.mk> | ||||
.include <bsd.files.mk> | .include <bsd.files.mk> | ||||
.include <bsd.incs.mk> | .include <bsd.incs.mk> | ||||
.include <bsd.confs.mk> | .include <bsd.confs.mk> | ||||
.endif | .endif | ||||
LINKOWN?= ${LIBOWN} | |||||
LINKGRP?= ${LIBGRP} | |||||
LINKMODE?= ${LIBMODE} | |||||
SYMLINKOWN?= ${LIBOWN} | |||||
SYMLINKGRP?= ${LIBGRP} | |||||
.include <bsd.links.mk> | .include <bsd.links.mk> | ||||
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) | .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) | ||||
realinstall: maninstall | realinstall: maninstall | ||||
.ORDER: beforeinstall maninstall | .ORDER: beforeinstall maninstall | ||||
.endif | .endif | ||||
.endif | .endif | ||||
Show All 33 Lines |