[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.251 and 1.252

version 1.251, 2004/04/18 13:11:31 version 1.252, 2004/05/23 01:45:21
Line 25  MKDEP_SUFFIXES?= .o .po .so .ln
Line 25  MKDEP_SUFFIXES?= .o .po .so .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++}
   
 .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE})  .if !defined(SHLIB_MAJOR) && 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  SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
Line 38  checkver:
Line 38  checkver:
             ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \              ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
                     -d ${DESTDIR}${_LIBSODIR} ${LIB})                      -d ${DESTDIR}${_LIBSODIR} ${LIB})
 .endif  .endif
 .endif  .endif                                                                  # }
   
 .if !target(checkver)  .if !target(checkver)
 checkver:  checkver:
Line 65  print-shlib-teeny:
Line 65  print-shlib-teeny:
         @false          @false
 .endif  .endif
   
 .if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)  .if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)                         # {
 .if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)  .if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
 .if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)  .if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
 SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}  SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
Line 75  SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB
Line 75  SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB
 .else  .else
 SHLIB_FULLVERSION=${SHLIB_MAJOR}  SHLIB_FULLVERSION=${SHLIB_MAJOR}
 .endif  .endif
 .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.
Line 107  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 107  SHLIB_FULLVERSION=${SHLIB_MAJOR}
 #                       (usually just ${CPPPICFLAGS} ${CPICFLAGS})  #                       (usually just ${CPPPICFLAGS} ${CPICFLAGS})
 # APICFLAGS:            flags for ${AS} to assemble .[sS] to .so objects.  # APICFLAGS:            flags for ${AS} to assemble .[sS] to .so objects.
   
 .if ${MACHINE_ARCH} == "alpha"  .if ${MACHINE_ARCH} == "alpha"                                          # {
   
 FPICFLAGS ?= -fPIC  FPICFLAGS ?= -fPIC
 CPICFLAGS ?= -fPIC -DPIC  CPICFLAGS ?= -fPIC -DPIC
Line 116  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
Line 116  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?=  APICFLAGS ?=
   
 .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \  .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
        ${OBJECT_FMT} == "ELF"         ${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 126  CPPPICFLAGS?= -DPIC -DBIGPIC
Line 126  CPPPICFLAGS?= -DPIC -DBIGPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?= -KPIC  APICFLAGS ?= -KPIC
   
 .elif ${MACHINE_ARCH} == "ns32k"  .elif ${MACHINE_ARCH} == "ns32k"                                        # } {
   
 # XXX no shared libraries yet on ns32k  # XXX no shared libraries yet on ns32k
 FPICFLAGS?=  FPICFLAGS?=
Line 135  CPPPICFLAGS?=
Line 135  CPPPICFLAGS?=
 CAPICFLAGS?=  CAPICFLAGS?=
 APICFLAGS?=  APICFLAGS?=
   
 .else  .else                                                                   # } {
   
 # Platform-independent flags for NetBSD shared libraries  # Platform-independent flags for NetBSD shared libraries
 SHLIB_SOVERSION=${SHLIB_FULLVERSION}  SHLIB_SOVERSION=${SHLIB_FULLVERSION}
Line 146  CPPPICFLAGS?= -DPIC
Line 146  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS?= -k  APICFLAGS?= -k
   
 .endif  .endif                                                                  # }
   
 .if ${MKPICLIB} != "no"  .if ${MKPICLIB} != "no"
 CSHLIBFLAGS+= ${CPICFLAGS}  CSHLIBFLAGS+= ${CPICFLAGS}
Line 329  FFLAGS+= ${FOPTS}
Line 329  FFLAGS+= ${FOPTS}
         ${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}          ${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
         rm -f ${.TARGET}.tmp          rm -f ${.TARGET}.tmp
   
 .if defined(LIB)  .if defined(LIB)                                                        # {
 .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \  .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
         || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"          || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
 _LIBS=lib${LIB}.a  _LIBS=lib${LIB}.a
Line 339  _LIBS=
Line 339  _LIBS=
   
 OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}  OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
   
   .if ${MKPRIVATELIB} != "no"
   # No installation is required
   libinstall::
   .else   # ${MKPRIVATELIB} == "no"                                       # {
   
 .if ${MKPROFILE} != "no"  .if ${MKPROFILE} != "no"
 _LIBS+=lib${LIB}_p.a  _LIBS+=lib${LIB}_p.a
 POBJS+=${OBJS:.o=.po}  POBJS+=${OBJS:.o=.po}
 .endif  .endif
   
 .if ${MKPIC} != "no"  .if ${MKPIC} != "no"                                                    # {
 .if ${MKPICLIB} == "no"  .if ${MKPICLIB} == "no"
 .if ${MKSHLIBOBJS} != "no"  .if ${MKSHLIBOBJS} != "no"
 # make _pic.a, which isn't really pic,  # make _pic.a, which isn't really pic,
Line 363  SOBJS+=${OBJS:.o=.so}
Line 368  SOBJS+=${OBJS:.o=.so}
 .if defined(SHLIB_FULLVERSION)  .if defined(SHLIB_FULLVERSION)
 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}  _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
 .endif  .endif                                                                  # }
   
 LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)  .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
 _LIBS+=llib-l${LIB}.ln  _LIBS+=llib-l${LIB}.ln
 .endif  .endif
   
   .endif  # ${MKPRIVATELIB} == "no"                                       # }
   
 ALLOBJS=  ALLOBJS=
 .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \  .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
         || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"          || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
Line 379  ALLOBJS+=${POBJS} ${SOBJS}
Line 386  ALLOBJS+=${POBJS} ${SOBJS}
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)  .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
 ALLOBJS+=${LOBJS}  ALLOBJS+=${LOBJS}
 .endif  .endif
 .else  .else   # !defined(LIB)                                                 # } {
 LOBJS=  LOBJS=
 SOBJS=  SOBJS=
 .endif  .endif  # !defined(LIB)                                                 # }
   
 .NOPATH: ${ALLOBJS} ${_LIBS} ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}  .NOPATH: ${ALLOBJS} ${_LIBS} ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
   
Line 456  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
Line 463  lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
         mv -f lib${LIB}.so.tmp lib${LIB}.so          mv -f lib${LIB}.so.tmp lib${LIB}.so
 .endif  .endif
   
 .if !empty(LOBJS)  .if !empty(LOBJS)                                                       # {
 LLIBS?=         -lc  LLIBS?=         -lc
 llib-l${LIB}.ln: ${LOBJS}  llib-l${LIB}.ln: ${LOBJS}
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
Line 466  llib-l${LIB}.ln: ${LOBJS}
Line 473  llib-l${LIB}.ln: ${LOBJS}
 .else  .else
         ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}          ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
 .endif  .endif
 .endif  .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}
Line 476  cleanlib: .PHONY
Line 483  cleanlib: .PHONY
         rm -f ${OBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp}          rm -f ${OBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp}
         rm -f llib-l${LIB}.ln ${LOBJS}          rm -f llib-l${LIB}.ln ${LOBJS}
   
 .if !target(libinstall)  
   .if !target(libinstall)                                                 # {
 # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no  # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
 libinstall::  libinstall::
   
Line 606  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
Line 614  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                 ${SYSPKGTAG} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}                  ${SYSPKGTAG} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
 .endif  .endif
 .endif  .endif  # !target(libinstall)                                           # }
   
 ##### Pull in related .mk logic  ##### Pull in related .mk logic
 .include <bsd.man.mk>  .include <bsd.man.mk>

Legend:
Removed from v.1.251  
changed lines
  Added in v.1.252

CVSweb <webmaster@jp.NetBSD.org>