[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.289.2.5 and 1.290

version 1.289.2.5, 2014/09/03 02:09:24 version 1.290, 2008/11/24 02:01:46
Line 9 
Line 9 
   
 LIBISMODULE?=   no  LIBISMODULE?=   no
 LIBISPRIVATE?=  no  LIBISPRIVATE?=  no
 LIBISCXX?=      no  
   
 _LIB_PREFIX=    lib  _LIB_PREFIX=    lib
   
Line 68  DPADD+=  ${LIBDO.${_lib}}/lib${_lib}.so
Line 67  DPADD+=  ${LIBDO.${_lib}}/lib${_lib}.so
 .endif                                                                  # }  .endif                                                                  # }
   
 ##### Build and install rules  ##### Build and install rules
 MKDEP_SUFFIXES?=        .o .po .pico .go .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 127  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 126  SHLIB_FULLVERSION=${SHLIB_MAJOR}
   
 # add additional suffixes not exported.  # add additional suffixes not exported.
 # .po is used for profiling object files.  # .po is used for profiling object files.
 # .pico is used for PIC object files.  # .so is used for PIC object files.
 .SUFFIXES: .out .a .ln .pico .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r .y .l .cl .p .h  .SUFFIXES: .out .a .ln .so .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r .y .l .cl .p .h
 .SUFFIXES: .sh .m4 .m  .SUFFIXES: .sh .m4 .m
   
   
Line 146  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 145  SHLIB_FULLVERSION=${SHLIB_MAJOR}
 #                       with ELF, also set shared-lib version for ld.so.  #                       with ELF, also set shared-lib version for ld.so.
 # SHLIB_LDSTARTFILE:    support .o file, call C++ file-level constructors  # SHLIB_LDSTARTFILE:    support .o file, call C++ file-level constructors
 # SHLIB_LDENDFILE:      support .o file, call C++ file-level destructors  # SHLIB_LDENDFILE:      support .o file, call C++ file-level destructors
 # FPICFLAGS:            flags for ${FC} to compile .[fF] files to .pico objects.  # FPICFLAGS:            flags for ${FC} to compile .[fF] files to .so objects.
 # CPPPICFLAGS:          flags for ${CPP} to preprocess .[sS] files for ${AS}  # CPPPICFLAGS:          flags for ${CPP} to preprocess .[sS] files for ${AS}
 # CPICFLAGS:            flags for ${CC} to compile .[cC] files to pic objects.  # CPICFLAGS:            flags for ${CC} to compile .[cC] files to pic objects.
 # CSHLIBFLAGS:          flags for ${CC} to compile .[cC] files to .pico objects.  # CSHLIBFLAGS:          flags for ${CC} to compile .[cC] files to .so objects.
 #                       (usually includes ${CPICFLAGS})  #                       (usually includes ${CPICFLAGS})
 # CAPICFLAGS:           flags for ${CC} to compiling .[Ss] files  # CAPICFLAGS:           flags for ${CC} to compiling .[Ss] files
 #                       (usually just ${CPPPICFLAGS} ${CPICFLAGS})  #                       (usually just ${CPPPICFLAGS} ${CPICFLAGS})
 # APICFLAGS:            flags for ${AS} to assemble .[sS] to .pico objects.  # APICFLAGS:            flags for ${AS} to assemble .[sS] to .so objects.
   
 .if ${MACHINE_ARCH} == "alpha"                                          # {  .if ${MACHINE_ARCH} == "alpha"                                          # {
   
Line 202  MKSHLIBOBJS= no
Line 201  MKSHLIBOBJS= no
 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?=     ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
 SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o  SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
 .endif  .endif
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
Line 229  FFLAGS+= ${FOPTS}
Line 228  FFLAGS+= ${FOPTS}
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}          ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
   
 .c.pico:  .c.so:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
Line 254  FFLAGS+= ${FOPTS}
Line 253  FFLAGS+= ${FOPTS}
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}          ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
   
 .cc.pico .cpp.pico .cxx.pico .C.pico:  .cc.so .cpp.so .cxx.so .C.so:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
Line 279  FFLAGS+= ${FOPTS}
Line 278  FFLAGS+= ${FOPTS}
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}          ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
   
 .f.pico:  .f.so:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(FOPTS) || empty(FOPTS:M*-g*)  .if !defined(FOPTS) || empty(FOPTS:M*-g*)
Line 311  FFLAGS+= ${FOPTS}
Line 310  FFLAGS+= ${FOPTS}
         ${OBJCOPY} -X ${.TARGET}          ${OBJCOPY} -X ${.TARGET}
 .endif  .endif
   
 .m.pico:  .m.so:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)  .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
Line 346  FFLAGS+= ${FOPTS}
Line 345  FFLAGS+= ${FOPTS}
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
   
 .s.pico:  .s.so:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         ${OBJCOPY} -x ${.TARGET}          ${OBJCOPY} -x ${.TARGET}
   
 .S.pico:  .S.so:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         ${OBJCOPY} -x ${.TARGET}          ${OBJCOPY} -x ${.TARGET}
Line 394  PROFFLAGS?=-DGPROF -DPROF
Line 393  PROFFLAGS?=-DGPROF -DPROF
 # since it's needed for making shared lib.  # since it's needed for making shared lib.
 # but don't install it.  # but don't install it.
 SOLIB=lib${LIB}_pic.a  SOLIB=lib${LIB}_pic.a
 SOBJS+=${OBJS:.o=.pico}  SOBJS+=${OBJS:.o=.so}
 .else  .else
 SOLIB=lib${LIB}.a  SOLIB=lib${LIB}.a
 .endif  .endif
 .else  .else
 SOLIB=lib${LIB}_pic.a  SOLIB=lib${LIB}_pic.a
 _LIBS+=${SOLIB}  _LIBS+=${SOLIB}
 SOBJS+=${OBJS:.o=.pico}  SOBJS+=${OBJS:.o=.so}
 .endif  .endif
 .if defined(SHLIB_FULLVERSION)  .if defined(SHLIB_FULLVERSION)
 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}  _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
Line 493  LDADD+= -lgcc_pic
Line 492  LDADD+= -lgcc_pic
 .endif  .endif
 .endif  .endif
   
 .if ${LIBISCXX} != "no"  
 LIBCC:= ${CXX}  
 .else  
 LIBCC:= ${CC}  
 .endif  
   
 lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}      ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
         ${_MKTARGET_BUILD}          ${_MKTARGET_BUILD}
         rm -f lib${LIB}.so.${SHLIB_FULLVERSION}          rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
 .if defined(DESTDIR)  .if defined(DESTDIR)
         ${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}${SHLIBDIR}/ \          ${CC} ${LDLIBC} -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}
 .else  .else
         ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \          ${CC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \
             -o ${.TARGET} ${_LIBLDOPTS} \              -o ${.TARGET} ${_LIBLDOPTS} \
             -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}              -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}
 .endif  .endif
Line 714  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
Line 707  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
 .endif  # !target(libinstall)                                           # }  .endif  # !target(libinstall)                                           # }
   
 ##### Pull in related .mk logic  ##### Pull in related .mk logic
 LINKSOWN?= ${LIBOWN}  
 LINKSGRP?= ${LIBGRP}  
 LINKSMODE?= ${LIBMODE}  
 .include <bsd.man.mk>  .include <bsd.man.mk>
 .include <bsd.nls.mk>  .include <bsd.nls.mk>
 .include <bsd.files.mk>  .include <bsd.files.mk>

Legend:
Removed from v.1.289.2.5  
changed lines
  Added in v.1.290

CVSweb <webmaster@jp.NetBSD.org>