[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.6.1 and 1.274

version 1.273.6.1, 2008/05/18 12:31:18 version 1.274, 2008/04/26 20:03:44
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>
   
 LIBISPRIVATE?=  no  
   
 .if ${LIBISPRIVATE} != "no"  
 MKDEBUGLIB:=    no  
 MKLINT:=        no  
 MKPIC:=         no  
 MKPROFILE:=     no  
 .endif  
   
 ##### Basic targets  ##### Basic targets
 .PHONY:         checkver libinstall  .PHONY:         checkver libinstall
 realinstall:    checkver libinstall  realinstall:    checkver libinstall
Line 342  OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
Line 333  OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
   
 STOBJS+=${OBJS}  STOBJS+=${OBJS}
   
 LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  .if ${MKPRIVATELIB} != "no"
   
 .if ${LIBISPRIVATE} != "no"  
 # No installation is required  # No installation is required
 libinstall::  libinstall::
 .else   # ${LIBISPRIVATE} == "no"                                       # {  .else   # ${MKPRIVATELIB} == "no"                                       # {
   
 .if ${MKDEBUGLIB} != "no"  .if ${MKDEBUGLIB} != "no"
 _LIBS+=lib${LIB}_g.a  _LIBS+=lib${LIB}_g.a
Line 382  _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
Line 371  _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
 .endif                                                                  # }  .endif                                                                  # }
   
 .if ${MKLINT} != "no" && !empty(LOBJS)  LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
   .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
 _LIBS+=llib-l${LIB}.ln  _LIBS+=llib-l${LIB}.ln
 .endif  .endif
   
 .endif  # ${LIBISPRIVATE} == "no"                                       # }  .endif  # ${MKPRIVATELIB} == "no"                                       # }
   
 ALLOBJS=  ALLOBJS=
 .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \  .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
Line 394  ALLOBJS=
Line 384  ALLOBJS=
 ALLOBJS+=${STOBJS}  ALLOBJS+=${STOBJS}
 .endif  .endif
 ALLOBJS+=${POBJS} ${SOBJS}  ALLOBJS+=${POBJS} ${SOBJS}
 .if ${MKLINT} != "no" && !empty(LOBJS)  .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
 ALLOBJS+=${LOBJS}  ALLOBJS+=${LOBJS}
 .endif  .endif
 .else   # !defined(LIB)                                                 # } {  .else   # !defined(LIB)                                                 # } {
Line 451  _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}$
Line 441  _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}$
                 -L${DESTDIR}${SHLIBINSTALLDIR}                  -L${DESTDIR}${SHLIBINSTALLDIR}
 .endif  .endif
   
 # gcc -shared now adds -lc automatically. For libraries other than libc and  .if ${LIB} != "c"
 # libgcc* we add as a dependency the installed shared libc. For libc and  
 # libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that  
 # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not  
 # to add standard libraries, not the linker.  
 .if !defined(LIB)  
 DPLIBC ?= ${DESTDIR}${LIBC_SO}  
 .else  
 .if ${LIB} != "c" && ${LIB:Mgcc*} == ""  
 DPLIBC ?= ${DESTDIR}${LIBC_SO}  DPLIBC ?= ${DESTDIR}${LIBC_SO}
 .else  LDLIBC ?= -lc
 LDLIBC ?= -nodefaultlibs  
 .if ${LIB} == "c"  
 LDADD+= -lgcc_pic  
 .endif  
 .endif  
 .endif  .endif
   
 lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
Line 474  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 451  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
         ${_MKTARGET_BUILD}          ${_MKTARGET_BUILD}
         rm -f lib${LIB}.so.${SHLIB_FULLVERSION}          rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
 .if defined(DESTDIR)  .if defined(DESTDIR)
         ${CC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \          ${CC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
             ${_LIBLDOPTS} \              ${_LIBLDOPTS} \
             -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \              -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
             -Wl,--whole-archive ${SOLIB} \              -Wl,--whole-archive ${SOLIB} \
             -Wl,--no-whole-archive ${LDADD} \              -Wl,--no-whole-archive ${LDADD} \
             -L${_GCC_LIBGCCDIR}              -L${_GCC_LIBGCCDIR} ${LDLIBC}
 .else  .else
         ${CC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \          ${CC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
             -o ${.TARGET} ${_LIBLDOPTS} \              ${_LIBLDOPTS} \
             -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}              -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD} \
               ${LDLIBC}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .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
Line 507  llib-l${LIB}.ln: ${LOBJS}
Line 485  llib-l${LIB}.ln: ${LOBJS}
 .endif  .endif
 .endif                                                                  # }  .endif                                                                  # }
   
 lint: ${LOBJS}  
 .if defined(LOBJS) && !empty(LOBJS)  
         ${LINT} ${LINTFLAGS} ${LOBJS}  
 .endif  
   
 cleanlib: .PHONY  cleanlib: .PHONY
         rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}          rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
         rm -f lib${LIB}.a ${STOBJS}          rm -f lib${LIB}.a ${STOBJS}
Line 650  ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SH
Line 623  ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SH
 .endif  .endif
 .endif  .endif
   
 .if ${MKLINT} != "no" && !empty(LOBJS)  .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
 libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
 .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
   

Legend:
Removed from v.1.273.6.1  
changed lines
  Added in v.1.274

CVSweb <webmaster@jp.NetBSD.org>