bsd.lib.mk (54bc9e303d53bdb9f716e977230b706e2e9f345c) | bsd.lib.mk (1b337a349d5de20366deac38a575ae5402cf45b9) |
---|---|
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) 8LIB= ${LIB_CXX} --- 201 unchanged lines hidden (view full) --- 210.endif 211 212.if target(beforelinking) 213beforelinking: ${SOBJS} 214${SHLIB_NAME_FULL}: beforelinking 215.endif 216 217.if defined(SHLIB_LINK) | 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) 8LIB= ${LIB_CXX} --- 201 unchanged lines hidden (view full) --- 210.endif 211 212.if target(beforelinking) 213beforelinking: ${SOBJS} 214${SHLIB_NAME_FULL}: beforelinking 215.endif 216 217.if defined(SHLIB_LINK) |
218# ${_LDSCRIPTROOT} is needed when cross-building 219# and when building 32 bits library shims. 220# 221# ${_LDSCRIPTROOT} is the directory prefix that will be used when generating 222# ld(1) scripts. The crosstools' ld is configured to lookup libraries in an 223# alternative directory which is called "sysroot", so during buildworld binaries 224# won't be linked against the running system libraries but against the ones of 225# the current source tree. ${_LDSCRIPTROOT} behavior is twisted because of 226# the location where we store them: 227# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty 228# because ld(1) will manage to find them from sysroot; 229# - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full 230# path, outside of sysroot. 231# Note that ld(1) scripts are generated both during buildworld and 232# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty 233# because on the target system, libraries are meant to be looked up from /. | |
234.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) 235${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT} | 218.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) 219${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT} |
236 sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${_SHLIBDIR}/${SHLIB_NAME},g' \ 237 -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${_LIBDIR},g' \ | 220 sed -e 's,@@SHLIB@@,${_SHLIBDIR}/${SHLIB_NAME},g' \ 221 -e 's,@@LIBDIR@@,${_LIBDIR},g' \ |
238 ${.ALLSRC} > ${.TARGET} 239 240${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld 241CLEANFILES+= ${SHLIB_LINK:R}.ld 242.endif 243CLEANFILES+= ${SHLIB_LINK} 244.endif 245 --- 87 unchanged lines hidden (view full) --- 333_SHLINSTALLFLAGS:= ${SHLINSTALLFLAGS} 334.for ie in ${INSTALLFLAGS_EDIT} 335_SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} 336.endfor 337 338.if !defined(INTERNALLIB) 339realinstall: _libinstall 340.ORDER: beforeinstall _libinstall | 222 ${.ALLSRC} > ${.TARGET} 223 224${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld 225CLEANFILES+= ${SHLIB_LINK:R}.ld 226.endif 227CLEANFILES+= ${SHLIB_LINK} 228.endif 229 --- 87 unchanged lines hidden (view full) --- 317_SHLINSTALLFLAGS:= ${SHLINSTALLFLAGS} 318.for ie in ${INSTALLFLAGS_EDIT} 319_SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} 320.endfor 321 322.if !defined(INTERNALLIB) 323realinstall: _libinstall 324.ORDER: beforeinstall _libinstall |
341.if target(${SHLIB_LINK:R}.ld) 342_libinstall: ${SHLIB_LINK:R}.ld 343.endif | |
344_libinstall: 345.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" 346 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 347 ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/ 348.endif 349.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) 350 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 351 ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/ --- 10 unchanged lines hidden (view full) --- 362 ${_INSTALLFLAGS} \ 363 ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/ 364.endif 365.if defined(SHLIB_LINK) 366.if commands(${SHLIB_LINK:R}.ld) 367 ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 368 ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ 369 ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} | 325_libinstall: 326.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" 327 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 328 ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/ 329.endif 330.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) 331 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 332 ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/ --- 10 unchanged lines hidden (view full) --- 343 ${_INSTALLFLAGS} \ 344 ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/ 345.endif 346.if defined(SHLIB_LINK) 347.if commands(${SHLIB_LINK:R}.ld) 348 ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 349 ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ 350 ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} |
370 rm -f ${SHLIB_LINK:R}.ld | |
371.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} 372 ${INSTALL_SYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} 373.endfor 374.else 375.if ${_SHLIBDIR} == ${_LIBDIR} 376 ${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 377.else 378 ${INSTALL_RSYMLINK} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ --- 78 unchanged lines hidden --- | 351.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} 352 ${INSTALL_SYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} 353.endfor 354.else 355.if ${_SHLIBDIR} == ${_LIBDIR} 356 ${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} 357.else 358 ${INSTALL_RSYMLINK} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ --- 78 unchanged lines hidden --- |