[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.169 and 1.169.2.6

version 1.169, 2000/06/19 19:35:05 version 1.169.2.6, 2000/09/29 19:27:00
Line 19  clean cleandir distclean: cleanlib
Line 19  clean cleandir distclean: cleanlib
 .if exists(${SHLIB_VERSION_FILE})  .if exists(${SHLIB_VERSION_FILE})
 SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major  SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
 SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor  SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
   SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; 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}) && \
         exists(${BSDSRCDIR}/lib/checkver)          exists(${BSDSRCDIR}/lib/checkver)
 checkver:  checkver:
         @(cd ${.CURDIR} && \          @(cd ${.CURDIR} && \
                 ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \                  sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
                     -d ${DESTDIR}${LIBDIR} ${LIB})                      -d ${DESTDIR}${LIBDIR} ${LIB})
 .else  .endif
   .endif
   
   .if !target(checkver)
 checkver:  checkver:
 .endif  .endif
   
 print-shlib-major:  print-shlib-major:
   .if defined(SHLIB_MAJOR)
         @echo ${SHLIB_MAJOR}          @echo ${SHLIB_MAJOR}
   .else
           @false
   .endif
   
 print-shlib-minor:  print-shlib-minor:
   .if defined(SHLIB_MINOR)
         @echo ${SHLIB_MINOR}          @echo ${SHLIB_MINOR}
 .else  .else
 checkver:  
   
 print-shlib-major:  
         @false          @false
   .endif
   
 print-shlib-minor:  print-shlib-teeny:
   .if defined(SHLIB_TEENY)
           @echo ${SHLIB_TEENY}
   .else
         @false          @false
 .endif  .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
   SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
   .endif
   .else
   SHLIB_FULLVERSION=${SHLIB_MAJOR}
   .endif
   .endif
   
 # add additional suffixes not exported.  # add additional suffixes not exported.
 # .po is used for profiling object files.  # .po is used for profiling object files.
 # .so is used for PIC object files.  # .so is used for PIC object files.
Line 60  print-shlib-minor:
Line 83  print-shlib-minor:
 # 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_TEENY}]]
 # 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 88  AINC+=-DABICALLS
Line 112  AINC+=-DABICALLS
 AFLAGS+= -fPIC  AFLAGS+= -fPIC
 AS+=    -KPIC  AS+=    -KPIC
   
 .elif ${MACHINE_ARCH} == "sparc" && ${OBJECT_FMT} == "ELF"  .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
          ${OBJECT_FMT} == "ELF"
   
   CPICFLAGS ?= -fPIC -DPIC
   CPPPICFLAGS?= -DPIC
   CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
   APICFLAGS ?= -KPIC
   
   .elif ${MACHINE_ARCH} == "sparc64" && ${OBJECT_FMT} == "ELF"
   
 CPICFLAGS ?= -fPIC -DPIC  CPICFLAGS ?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
Line 100  APICFLAGS ?= -KPIC
Line 132  APICFLAGS ?= -KPIC
 # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)  # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
 SHLIB_LDSTARTFILE=  SHLIB_LDSTARTFILE=
 SHLIB_LDENDFILE=  SHLIB_LDENDFILE=
   SHLIB_SOVERSION=${SHLIB_FULLVERSION}
 SHLIB_SHFLAGS=  SHLIB_SHFLAGS=
 SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}  
 CPICFLAGS?= -fPIC -DPIC  CPICFLAGS?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
Line 254  SOLIB=lib${LIB}_pic.a
Line 286  SOLIB=lib${LIB}_pic.a
 _LIBS+=${SOLIB}  _LIBS+=${SOLIB}
 SOBJS+=${OBJS:.o=.so}  SOBJS+=${OBJS:.o=.so}
 .endif  .endif
 .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)  .if defined(SHLIB_FULLVERSION)
 _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}  _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
 .endif  .endif
   
Line 300  lib${LIB}_p.a:: ${POBJS} __archivebuild
Line 332  lib${LIB}_p.a:: ${POBJS} __archivebuild
 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_MAJOR}.${SHLIB_MINOR}: ${SOLIB} ${DPADD} \  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}      ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
         @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)          @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
         @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}          @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
 .if defined(DESTDIR)  .if defined(DESTDIR)
         $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \          $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
             ${SHLIB_LDSTARTFILE} \              ${SHLIB_LDSTARTFILE} \
             --whole-archive ${SOLIB} \              --whole-archive ${SOLIB} \
             -L${DESTDIR}${LIBDIR} -R${LIBDIR} \  
             --no-whole-archive ${LDADD} \              --no-whole-archive ${LDADD} \
               -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
             ${SHLIB_LDENDFILE}              ${SHLIB_LDENDFILE}
 .else  .else
         $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \          $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
Line 319  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
Line 351  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
 .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_MAJOR}.${SHLIB_MINOR} \          ln -s lib${LIB}.so.${SHLIB_FULLVERSION} 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_MAJOR}.${SHLIB_MINOR} \          ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so
             lib${LIB}.so  
 .endif  .endif
   
 LLIBS?=         -lc  LLIBS?=         -lc
Line 396  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
Line 426  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
 .endif  .endif
 .endif  .endif
   
 .if ${MKPIC} != "no" && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)  .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}  .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
   
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
 .endif  .endif
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \          ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
             -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}              -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
Line 414  ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB
Line 444  ${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_MAJOR}.${SHLIB_MINOR} \          ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
             ${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_MAJOR}.${SHLIB_MINOR} \          ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so              ${DESTDIR}${LIBDIR}/lib${LIB}.so
 .endif  .endif
 .endif  .endif

Legend:
Removed from v.1.169  
changed lines
  Added in v.1.169.2.6

CVSweb <webmaster@jp.NetBSD.org>