[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.305 and 1.311

version 1.305, 2010/03/02 20:49:18 version 1.311, 2011/02/06 00:52:49
Line 64  DPADD+=  ${LIBDO.${_lib}}/lib${_lib}.so
Line 64  DPADD+=  ${LIBDO.${_lib}}/lib${_lib}.so
 MKDEP_SUFFIXES?=        .o .po .pico .go .ln  MKDEP_SUFFIXES?=        .o .po .pico .go .ln
   
 # Use purely kernel private headers in rump builds  # Use purely kernel private headers in rump builds
 .if !defined(RUMPKERNEL)  # Skip NetBSD headers for the toolchain builds
   .if !defined(RUMPKERNEL) && !defined(HOSTLIB)
 .if empty(CPPFLAGS:M-nostdinc)  .if empty(CPPFLAGS:M-nostdinc)
 CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}  CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
 .endif  .endif
Line 140  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 141  SHLIB_FULLVERSION=${SHLIB_MAJOR}
   
 # Data-driven table using make variables to control how shared libraries  # Data-driven table using make variables to control how shared libraries
 # are built for different platforms and object formats.  # are built for different platforms and object formats.
 # OBJECT_FMT:           currently either "ELF" or "a.out", from <bsd.own.mk>  
 # SHLIB_MAJOR, SHLIB_MINOR, SHLIB_TEENY: Major, minor, and teeny version  # SHLIB_MAJOR, SHLIB_MINOR, SHLIB_TEENY: Major, minor, and teeny version
 #                       numbers of shared library  #                       numbers of shared library
 # SHLIB_SOVERSION:      version number to be compiled into a shared library  # SHLIB_SOVERSION:      version number to be compiled into a shared library
Line 168  CPPPICFLAGS?= -DPIC
Line 168  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?=  APICFLAGS ?=
   
 .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \  .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64")      # } {
        ${OBJECT_FMT} == "ELF"                                           # } {  
   
 # If you use -fPIC you need to define BIGPIC to turn on 32-bit  # If you use -fPIC you need to define BIGPIC to turn on 32-bit
 # relocations in asm code  # relocations in asm code
Line 203  MKSHLIBOBJS= no
Line 202  MKSHLIBOBJS= no
 .endif  .endif
   
 # Platform-independent linker flags for ELF shared libraries  # Platform-independent linker flags for ELF shared libraries
 .if ${OBJECT_FMT} == "ELF"  
 SHLIB_SOVERSION=        ${SHLIB_MAJOR}  SHLIB_SOVERSION=        ${SHLIB_MAJOR}
 SHLIB_SHFLAGS=          -Wl,-soname,${_LIB_PREFIX}${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?=     ${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}  SHLIB_LDSTARTFILE?=     ${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}
 SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o  SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o
 .endif  
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
 OBJCFLAGS+=     ${OBJCOPTS}  OBJCFLAGS+=     ${OBJCOPTS}
Line 414  LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.l
Line 411  LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.l
 .if ${LIBISPRIVATE} != "no"  .if ${LIBISPRIVATE} != "no"
 # No installation is required  # No installation is required
 libinstall::  libinstall::
 .endif  # ${LIBISPRIVATE} == "no"                                       # {  .endif
   
 .if ${MKDEBUGLIB} != "no"  .if ${MKDEBUGLIB} != "no"
 _LIBS+=lib${LIB}_g.a  _LIBS+=lib${LIB}_g.a
Line 445  _LIBS+=${SOLIB}
Line 442  _LIBS+=${SOLIB}
 SOBJS+=${OBJS:.o=.pico}  SOBJS+=${OBJS:.o=.pico}
 .endif  .endif
 .if defined(SHLIB_FULLVERSION)  .if defined(SHLIB_FULLVERSION)
   _LIB.so:=lib${LIB}.so.${SHLIB_FULLVERSION}
   .if ${MKDEBUG} != "no"
   _LIB.debug:=${_LIB.so}.debug
   .endif
 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}  _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
 .endif                                                                  # }  .endif                                                                  # }
Line 471  _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YH
Line 472  _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YH
   
 .NOPATH: ${ALLOBJS} ${_LIBS} ${_YLSRCS}  .NOPATH: ${ALLOBJS} ${_LIBS} ${_YLSRCS}
   
 realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}  realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.debug}
   
 MKARZERO?=no  MKARZERO?=no
   
Line 522  lib${LIB}_g.a:: ${GOBJS} __archivebuild
Line 523  lib${LIB}_g.a:: ${GOBJS} __archivebuild
 _LIBLDOPTS=  _LIBLDOPTS=
 .if ${SHLIBDIR} != "/usr/lib"  .if ${SHLIBDIR} != "/usr/lib"
 _LIBLDOPTS+=    -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \  _LIBLDOPTS+=    -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \
                 -R${SHLIBDIR} \                  -Wl,-rpath,${SHLIBDIR} \
                 -L${DESTDIR}${SHLIBDIR}                  -L${DESTDIR}${SHLIBDIR}
 .elif ${SHLIBINSTALLDIR} != "/usr/lib"  .elif ${SHLIBINSTALLDIR} != "/usr/lib"
 _LIBLDOPTS+=    -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \  _LIBLDOPTS+=    -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
Line 572  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 573  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
             -o ${.TARGET} ${_LIBLDOPTS} \              -o ${.TARGET} ${_LIBLDOPTS} \
             -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${_LDADD.lib${LIB}}              -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${_LDADD.lib${LIB}}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  
 #  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
Line 583  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 583  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
 .endif  .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  
 .if ${MKSTRIPIDENT} != "no"  .if ${MKSTRIPIDENT} != "no"
         ${OBJCOPY} -R .ident ${.TARGET}          ${OBJCOPY} -R .ident ${.TARGET}
 .endif  .endif
   
   .if defined(_LIB.debug)
   ${_LIB.debug}: ${_LIB.so}
           ${_MKTARGET_CREATE}
           (  ${OBJCOPY} --only-keep-debug ${_LIB.so} ${_LIB.debug} \
           && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
                   --add-gnu-debuglink=${_LIB.debug} ${_LIB.so} \
           ) || (rm -f ${_LIB.debug}; false)
   .endif
   
 .if !empty(LOBJS)                                                       # {  .if !empty(LOBJS)                                                       # {
 LLIBS?=         -lc  LLIBS?=         -lc
 llib-l${LIB}.ln: ${LOBJS}  llib-l${LIB}.ln: ${LOBJS}
Line 610  cleanlib: .PHONY
Line 618  cleanlib: .PHONY
         rm -f lib${LIB}.a ${STOBJS}          rm -f lib${LIB}.a ${STOBJS}
         rm -f lib${LIB}_p.a ${POBJS}          rm -f lib${LIB}_p.a ${POBJS}
         rm -f lib${LIB}_g.a ${GOBJS}          rm -f lib${LIB}_g.a ${GOBJS}
         rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}          rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${_LIB.debug} ${SOBJS}
         rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}          rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}
         rm -f llib-l${LIB}.ln ${LOBJS}          rm -f llib-l${LIB}.ln ${LOBJS}
   
Line 721  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib
Line 729  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib
                 ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                 ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}                  ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
 .endif  .endif
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  
         /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}  
 .endif  
 .if ${OBJECT_FMT} == "ELF"  
 .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \  .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
     "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"      "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
         ${INSTALL_SYMLINK} \          ${INSTALL_SYMLINK} \
Line 747  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib
Line 751  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib
 .endif  .endif
 .endif  .endif
 .endif  .endif
   
   .if defined(_LIB.debug)
   libinstall:: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}
   .PRECIOUS: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}
   
   ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}: ${_LIB.debug}
           ${_MKTARGET_INSTALL}
           ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
                   ${.ALLSRC} ${.TARGET}
 .endif  .endif
   
 .if ${MKLINT} != "no" && !empty(LOBJS)  .if ${MKLINT} != "no" && !empty(LOBJS)

Legend:
Removed from v.1.305  
changed lines
  Added in v.1.311

CVSweb <webmaster@jp.NetBSD.org>