[BACK]Return to bsd.lib.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.lib.mk between version 1.273.4.1 and 1.273.4.2

version 1.273.4.1, 2008/06/02 13:21:43 version 1.273.4.2, 2008/10/05 20:11:24
Line 7 
Line 7 
 # Pull in <bsd.sys.mk> here so we can override its .c.o rule  # Pull in <bsd.sys.mk> here so we can override its .c.o rule
 .include <bsd.sys.mk>  .include <bsd.sys.mk>
   
   LIBISMODULE?=   no
 LIBISPRIVATE?=  no  LIBISPRIVATE?=  no
   
   _LIB_PREFIX=    lib
   
   .if ${LIBISMODULE} != "no"
   _LIB_PREFIX=    # empty
   MKDEBUGLIB:=    no
   MKLINT:=        no
   MKPICINSTALL:=  no
   MKPROFILE:=     no
   MKSTATICLIB:=   no
   .endif
   
 .if ${LIBISPRIVATE} != "no"  .if ${LIBISPRIVATE} != "no"
 MKDEBUGLIB:=    no  MKDEBUGLIB:=    no
 MKLINT:=        no  MKLINT:=        no
Line 43  DPADD+=  ${LIBDO.${_lib}}/lib${_lib}.so
Line 55  DPADD+=  ${LIBDO.${_lib}}/lib${_lib}.so
 .endif                                                                  # }  .endif                                                                  # }
   
 ##### Build and install rules  ##### Build and install rules
 MKDEP_SUFFIXES?=        .o .po .so .ln  MKDEP_SUFFIXES?=        .o .po .so .go .ln
 CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}  CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
 CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}  CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
   
Line 174  MKSHLIBOBJS= no
Line 186  MKSHLIBOBJS= no
 # Platform-independent linker flags for ELF shared libraries  # Platform-independent linker flags for ELF shared libraries
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
 SHLIB_SOVERSION=        ${SHLIB_MAJOR}  SHLIB_SOVERSION=        ${SHLIB_MAJOR}
 SHLIB_SHFLAGS=          -Wl,-soname,lib${LIB}.so.${SHLIB_SOVERSION}  SHLIB_SHFLAGS=          -Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
 SHLIB_SHFLAGS+=         -Wl,--warn-shared-textrel  SHLIB_SHFLAGS+=         -Wl,--warn-shared-textrel
 SHLIB_LDSTARTFILE?=     ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}  SHLIB_LDSTARTFILE?=     ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
 SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o  SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
Line 489  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 501  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
 #  We don't use INSTALL_SYMLINK here because this is just  #  We don't use INSTALL_SYMLINK here because this is just
 #  happening inside the build directory/objdir. XXX Why does  #  happening inside the build directory/objdir. XXX Why does
 #  this spend so much effort on libraries that aren't live??? XXX  #  this spend so much effort on libraries that aren't live??? XXX
   .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
       "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
         ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp          ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
         mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}          mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
   .endif
         ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp          ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
         mv -f lib${LIB}.so.tmp lib${LIB}.so          mv -f lib${LIB}.so.tmp lib${LIB}.so
 .endif  .endif
   .if ${MKSTRIPIDENT} != "no"
           ${OBJCOPY} -R .ident ${.TARGET}
   .endif
   
 .if !empty(LOBJS)                                                       # {  .if !empty(LOBJS)                                                       # {
 LLIBS?=         -lc  LLIBS?=         -lc
Line 603  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
Line 621  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
 .endif  .endif
   
 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)  .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
 libinstall:: ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  _LIB_SO_TGT=            ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
 .PRECIOUS: ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  _LIB_SO_TGTLIBDIR=         ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
   
   libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
   .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
   
 .if ${MKUPDATE} == "no"  .if ${MKUPDATE} == "no"
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}! .MADE  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
 .endif  .endif
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
 .else  .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
 .endif  .endif
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
         ${_MKTARGET_INSTALL}          ${_MKTARGET_INSTALL}
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                 ${.ALLSRC} ${.TARGET}                  ${.ALLSRC} ${.TARGET}
 .if ${_LIBSODIR} != ${LIBDIR}  .if ${_LIBSODIR} != ${LIBDIR}
         ${INSTALL_SYMLINK} \          ${INSTALL_SYMLINK} -l r \
                 -l r ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}                  ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
 .endif  .endif
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
         /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}          /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
   .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
       "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
         ${INSTALL_SYMLINK} \          ${INSTALL_SYMLINK} \
                 lib${LIB}.so.${SHLIB_FULLVERSION} \                  ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
                 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_MAJOR}                  ${_LIB_SO_TGT}.${SHLIB_MAJOR}
 .if ${_LIBSODIR} != ${LIBDIR}  .if ${_LIBSODIR} != ${LIBDIR}
         ${INSTALL_SYMLINK} \          ${INSTALL_SYMLINK} -l r \
                 -l r ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}                  ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
   .endif
 .endif  .endif
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no"
         ${INSTALL_SYMLINK} \          ${INSTALL_SYMLINK} \
                 lib${LIB}.so.${SHLIB_FULLVERSION} \                  ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
                 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so                  ${_LIB_SO_TGT}
 .if ${_LIBSODIR} != ${LIBDIR}  .if ${_LIBSODIR} != ${LIBDIR}
         ${INSTALL_SYMLINK} \          ${INSTALL_SYMLINK} -l r \
                 -l r ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                 ${DESTDIR}${LIBDIR}/lib${LIB}.so                  ${_LIB_SO_TGTLIBDIR}
 .endif  .endif
 .endif  .endif
 .endif  .endif

Legend:
Removed from v.1.273.4.1  
changed lines
  Added in v.1.273.4.2

CVSweb <webmaster@jp.NetBSD.org>