[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.152.2.4 and 1.153

version 1.152.2.4, 2000/08/14 14:04:12 version 1.153, 1999/06/07 01:37:00
Line 18  clean cleandir distclean: cleanlib
Line 18  clean cleandir distclean: cleanlib
 .if exists(${.CURDIR}/shlib_version)  .if exists(${.CURDIR}/shlib_version)
 SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major  SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
 SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor  SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
 SHLIB_TEENY != . ${.CURDIR}/shlib_version ; echo $$teeny  
   
 # Check for higher installed library versions.  # Check for higher installed library versions.
 .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \  .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
Line 26  SHLIB_TEENY != . ${.CURDIR}/shlib_versio
Line 25  SHLIB_TEENY != . ${.CURDIR}/shlib_versio
 checkver:  checkver:
         @(cd ${.CURDIR} && \          @(cd ${.CURDIR} && \
                 ${BSDSRCDIR}/lib/checkver -d ${DESTDIR}${LIBDIR} ${LIB})                  ${BSDSRCDIR}/lib/checkver -d ${DESTDIR}${LIBDIR} ${LIB})
 .endif  
 .endif  
   
 .if !target(checkver)  
 checkver:  
 .endif  
   
 .if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)  
 .if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)  
 .if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)  
 SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}  
 .else  .else
 SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}  checkver:
 .endif  .endif
 .else  .else
 SHLIB_FULLVERSION=${SHLIB_MAJOR}  checkver:
 .endif  
 .endif  .endif
   
 # add additional suffixes not exported.  # add additional suffixes not exported.
Line 60  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 47  SHLIB_FULLVERSION=${SHLIB_MAJOR}
 # OBJECT_FMT:           currently either "ELF" or "a.out", from <bsd.own.mk>  # OBJECT_FMT:           currently either "ELF" or "a.out", from <bsd.own.mk>
 # SHLIB_SOVERSION:      version number to be compiled into a shared library  # SHLIB_SOVERSION:      version number to be compiled into a shared library
 #                       via -soname. Usualy ${SHLIB_MAJOR} on ELF.  #                       via -soname. Usualy ${SHLIB_MAJOR} on ELF.
 #                       NetBSD/pmax used to use ${SHLIB_MAJOR}.${SHLIB-MINOR}.  #                       NetBSD/pmax used to use ${SHLIB_MAJOR}.{SHLIB-MINOR}.
 # SHLIB_SHFLAGS:        Flags to tell ${LD} to emit  shared library.  # SHLIB_SHFLAGS:        Flags to tell ${LD} to emit  shared library.
 #                       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
Line 105  APICFLAGS ?= -KPIC
Line 92  APICFLAGS ?= -KPIC
 SHLIB_LDSTARTFILE=  SHLIB_LDSTARTFILE=
 SHLIB_LDENDFILE=  SHLIB_LDENDFILE=
 SHLIB_SHFLAGS=  SHLIB_SHFLAGS=
 SHLIB_SOVERSION=${SHLIB_FULLVERSION}  SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
 CPICFLAGS?= -fpic -DPIC  CPICFLAGS?= -fpic -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
Line 124  SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crte
Line 111  SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crte
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
   
 .c.o:  .c.o:
   .if defined(COPTS) && !empty(COPTS:M*-g*)
           ${COMPILE.c} ${.IMPSRC}
   .else
         @echo ${COMPILE.c:Q} ${.IMPSRC}          @echo ${COMPILE.c:Q} ${.IMPSRC}
         @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .c.po:  .c.po:
   .if defined(COPTS) && !empty(COPTS:M*-g*)
           ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
   .else
         @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}          @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}          @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .c.so:  .c.so:
   .if defined(COPTS) && !empty(COPTS:M*-g*)
           ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
   .else
         @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .c.ln:  .c.ln:
         ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}          ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
   
 .cc.o .C.o:  .cc.o .C.o:
   .if defined(COPTS) && !empty(COPTS:M*-g*)
           ${COMPILE.cc} ${.IMPSRC}
   .else
         @echo ${COMPILE.cc:Q} ${.IMPSRC}          @echo ${COMPILE.cc:Q} ${.IMPSRC}
         @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .cc.po .C.po:  .cc.po .C.po:
   .if defined(COPTS) && !empty(COPTS:M*-g*)
           ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
   .else
         @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}          @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}          @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .cc.so .C.so:  .cc.so .C.so:
   .if defined(COPTS) && !empty(COPTS:M*-g*)
           ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
   .else
         @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .m.o:  .m.o:
   .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
           ${COMPILE.m} ${.IMPSRC}
   .else
         @echo ${COMPILE.m:Q} ${.IMPSRC}          @echo ${COMPILE.m:Q} ${.IMPSRC}
         @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .m.po:  .m.po:
   .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
           ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
   .else
         @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}          @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}          @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .m.so:  .m.so:
   .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
           ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
   .else
         @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o          @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
         @rm -f ${.TARGET}.o          @rm -f ${.TARGET}.o
   .endif
   
 .S.o .s.o:  .S.o .s.o:
         @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}          @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
Line 212  _LIBS+=lib${LIB}_p.a
Line 235  _LIBS+=lib${LIB}_p.a
 .if ${MKPIC} != "no"  .if ${MKPIC} != "no"
 _LIBS+=lib${LIB}_pic.a  _LIBS+=lib${LIB}_pic.a
 .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)  .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}  _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 .endif  .endif
 .endif  .endif
   
Line 251  SOBJS+=  ${OBJS:.o=.so}
Line 274  SOBJS+=  ${OBJS:.o=.so}
 lib${LIB}_pic.a:: ${SOBJS} __archivebuild  lib${LIB}_pic.a:: ${SOBJS} __archivebuild
         @echo building shared object ${LIB} library          @echo building shared object ${LIB} library
   
 lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}_pic.a ${DPADD} \  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD} \
     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}      ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
         @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)          @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
         @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}          @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 .if defined(DESTDIR)  .if defined(DESTDIR)
         $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \          $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
             ${SHLIB_LDSTARTFILE} \              ${SHLIB_LDSTARTFILE} \
Line 270  lib${LIB}.so.${SHLIB_FULLVERSION}: lib${
Line 293  lib${LIB}.so.${SHLIB_FULLVERSION}: lib${
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
         rm -f lib${LIB}.so.${SHLIB_MAJOR}          rm -f lib${LIB}.so.${SHLIB_MAJOR}
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \          ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
             lib${LIB}.so.${SHLIB_MAJOR}              lib${LIB}.so.${SHLIB_MAJOR}
         rm -f lib${LIB}.so          rm -f lib${LIB}.so
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \          ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
             lib${LIB}.so              lib${LIB}.so
 .endif  .endif
   
Line 308  libinstall:: ${DESTDIR}${LIBDIR}/lib${LI
Line 331  libinstall:: ${DESTDIR}${LIBDIR}/lib${LI
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a  .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
 .endif  .endif
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)  .if !defined(BUILD)
 ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
 .endif  .endif
   
Line 321  libinstall:: ${DESTDIR}${LIBDIR}/lib${LI
Line 344  libinstall:: ${DESTDIR}${LIBDIR}/lib${LI
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
 .endif  .endif
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)  .if !defined(BUILD)
 ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
 .endif  .endif
   
Line 334  libinstall:: ${DESTDIR}${LIBDIR}/lib${LI
Line 357  libinstall:: ${DESTDIR}${LIBDIR}/lib${LI
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
 .endif  .endif
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)  .if !defined(BUILD)
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
 .endif  .endif
   
Line 343  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
Line 366  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
 .endif  .endif
   
 .if ${MKPIC} != "no" && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)  .if ${MKPIC} != "no" && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 .endif  .endif
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD)
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: .MADE
 .endif  .endif
   
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \          ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
                 -m ${LIBMODE} ${.ALLSRC} ${.TARGET}                  -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
Line 360  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB
Line 383  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
         rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}          rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \          ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}              ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
         rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so          rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no"
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \          ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so              ${DESTDIR}${LIBDIR}/lib${LIB}.so
 .endif  .endif
 .endif  .endif
Line 375  libinstall:: ${DESTDIR}${LINTLIBDIR}/lli
Line 398  libinstall:: ${DESTDIR}${LINTLIBDIR}/lli
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
 .endif  .endif
 .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)  .if !defined(BUILD)
 ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
 .endif  .endif
   

Legend:
Removed from v.1.152.2.4  
changed lines
  Added in v.1.153

CVSweb <webmaster@jp.NetBSD.org>