[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.202 and 1.289.2.5

version 1.202, 2002/05/07 01:45:45 version 1.289.2.5, 2014/09/03 02:09:24
Line 2 
Line 2 
 #       @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94  #       @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
   
 .include <bsd.init.mk>  .include <bsd.init.mk>
   .include <bsd.shlib.mk>
   .include <bsd.gcc.mk>
   # Pull in <bsd.sys.mk> here so we can override its .c.o rule
   .include <bsd.sys.mk>
   
   LIBISMODULE?=   no
   LIBISPRIVATE?=  no
   LIBISCXX?=      no
   
   _LIB_PREFIX=    lib
   
   .if ${LIBISMODULE} != "no"
   _LIB_PREFIX=    # empty
   MKDEBUGLIB:=    no
   MKLINT:=        no
   MKPICINSTALL:=  no
   MKPROFILE:=     no
   MKSTATICLIB:=   no
   .endif
   
   .if ${LIBISPRIVATE} != "no"
   MKDEBUGLIB:=    no
   MKLINT:=        no
   MKPICINSTALL:=  no
   . if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
   MKSTATICLIB:=   no
   . else
   MKPIC:=         no
   . endif
   MKPROFILE:=     no
   .endif
   
 ##### Basic targets  ##### Basic targets
 .PHONY:         checkver cleanlib libinstall  .PHONY:         checkver libinstall
 realinstall:    checkver libinstall  realinstall:    checkver libinstall
 clean:          cleanlib  clean:          cleanlib
   
   ##### LIB specific flags.
   # XXX: This is needed for programs that link with .a libraries
   # Perhaps a more correct solution is to always generate _pic.a
   # files or always have a shared library.
   .if defined(MKPIE) && (${MKPIE} != "no")
   CFLAGS+=        ${PIE_CFLAGS}
   AFLAGS+=        ${PIE_AFLAGS}
   .endif
   COPTS+=     ${COPTS.lib${LIB}}
   CPPFLAGS+=  ${CPPFLAGS.lib${LIB}}
   CXXFLAGS+=  ${CXXFLAGS.lib${LIB}}
   OBJCOPTS+=  ${OBJCOPTS.lib${LIB}}
   LDADD+=     ${LDADD.lib${LIB}}
   LDFLAGS+=   ${LDFLAGS.lib${LIB}}
   LDSTATIC+=  ${LDSTATIC.lib${LIB}}
   
   ##### Libraries that this may depend upon.
   .if defined(LIBDPLIBS) && ${MKPIC} != "no"                              # {
   .for _lib _dir in ${LIBDPLIBS}
   .if !defined(LIBDO.${_lib})
   LIBDO.${_lib}!= cd ${_dir} && ${PRINTOBJDIR}
   .MAKEOVERRIDES+=LIBDO.${_lib}
   .endif
   LDADD+=         -L${LIBDO.${_lib}} -l${_lib}
   DPADD+=         ${LIBDO.${_lib}}/lib${_lib}.so
   .endfor
   .endif                                                                  # }
   
 ##### Build and install rules  ##### Build and install rules
   MKDEP_SUFFIXES?=        .o .po .pico .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_ISYSTEM} ${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 22  SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ;
Line 82  SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ;
         exists(${NETBSDSRCDIR}/lib/checkver)          exists(${NETBSDSRCDIR}/lib/checkver)
 checkver:  checkver:
         @(cd ${.CURDIR} && \          @(cd ${.CURDIR} && \
                 sh ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \              HOST_SH=${HOST_SH:Q} AWK=${TOOL_AWK:Q} \
               ${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 52  print-shlib-teeny:
Line 113  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 62  SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB
Line 123  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.
 # .so is used for PIC object files.  # .pico is used for PIC object files.
 .SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h  .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: .sh .m4 .m  .SUFFIXES: .sh .m4 .m
   
   
Line 85  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 146  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 .so objects.  # FPICFLAGS:            flags for ${FC} to compile .[fF] files to .pico objects.
 # CPPICFLAGS:           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 .so objects.  # CPICFLAGS:            flags for ${CC} to compile .[cC] files to pic objects.
 # CAPICFLAGS            flags for {$CC} to compiling .[Ss] files  # CSHLIBFLAGS:          flags for ${CC} to compile .[cC] files to .pico objects.
   #                       (usually includes ${CPICFLAGS})
   # CAPICFLAGS:           flags for ${CC} to compiling .[Ss] files
 #                       (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 .pico objects.
   
   .if ${MACHINE_ARCH} == "alpha"                                          # {
   
 .if ${MACHINE_ARCH} == "alpha"  
                 # Alpha-specific shared library flags  
 FPICFLAGS ?= -fPIC  FPICFLAGS ?= -fPIC
 CPICFLAGS ?= -fPIC -DPIC  CPICFLAGS ?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?=  APICFLAGS ?=
 .elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"  
                 # mips-specific shared library flags  
   
 # On mips, all libs are compiled with ABIcalls, not just sharedlibs.  
 MKPICLIB= no  
   
 # so turn shlib PIC flags on for ${AS}.  
 AINC+=-DABICALLS  
 AFLAGS+= -fPIC  
 AS+=    -KPIC  
   
 .elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"  
 # On the VAX, all object are PIC by default, not just sharedlibs.  
 MKPICLIB= no  
   
 .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
 FPICFLAGS ?= -fPIC  FPICFLAGS ?= -fPIC
 CPICFLAGS ?= -fPIC -DPIC  CPICFLAGS ?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC -DBIGPIC  CPPPICFLAGS?= -DPIC -DBIGPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?= -KPIC -DBIGPIC  APICFLAGS ?= -KPIC
   
 .else  .else                                                                   # } {
   
 # Platform-independent flags for NetBSD a.out shared libraries  # Platform-independent flags for NetBSD shared libraries
 SHLIB_SOVERSION=${SHLIB_FULLVERSION}  SHLIB_SOVERSION=${SHLIB_FULLVERSION}
 SHLIB_SHFLAGS=  SHLIB_SHFLAGS=
 FPICFLAGS ?= -fPIC  FPICFLAGS ?= -fPIC
 CPICFLAGS?= -fPIC -DPIC  CPICFLAGS?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS?= -k  APICFLAGS?= -k
   
   .endif                                                                  # }
   
   .if ${MKPICLIB} != "no"
   CSHLIBFLAGS+= ${CPICFLAGS}
 .endif  .endif
   
 MKPICLIB?= yes  .if defined(CSHLIBFLAGS) && !empty(CSHLIBFLAGS)
   MKSHLIBOBJS= yes
   .else
   MKSHLIBOBJS= no
   .endif
   
 # Platform-independent linker flags for ELF shared libraries  # Platform-independent linker flags for ELF shared libraries
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
 SHLIB_SOVERSION=        ${SHLIB_MAJOR}  SHLIB_SOVERSION=        ${SHLIB_MAJOR}
 SHLIB_SHFLAGS=          -soname lib${LIB}.so.${SHLIB_SOVERSION}  SHLIB_SHFLAGS=          -Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
 SHLIB_LDSTARTFILE?=     ${DESTDIR}/usr/lib/crtbeginS.o  SHLIB_SHFLAGS+=         -Wl,--warn-shared-textrel
 SHLIB_LDENDFILE?=       ${DESTDIR}/usr/lib/crtendS.o  SHLIB_LDSTARTFILE?=     ${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}
   SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o
 .endif  .endif
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
   OBJCFLAGS+=     ${OBJCOPTS}
   AFLAGS+=        ${COPTS}
 FFLAGS+=        ${FOPTS}  FFLAGS+=        ${FOPTS}
   
 .c.o:  .c.o:
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.c} ${.IMPSRC}          ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @echo ${COMPILE.c:Q} ${.IMPSRC}          ${OBJCOPY} -x ${.TARGET}
         @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .c.po:  .c.po:
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}          ${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -X ${.TARGET}
         @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o  .endif
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  .c.go:
 .endif          ${_MKTARGET_COMPILE}
           ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
 .c.so:  
 .if defined(COPTS) && !empty(COPTS:M*-g*)  .c.pico:
         ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${_MKTARGET_COMPILE}
 .else          ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
         @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o          ${OBJCOPY} -x ${.TARGET}
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  .endif
         @rm -f ${.TARGET}.o  
 .endif  .cc.o .cpp.o .cxx.o .C.o:
           ${_MKTARGET_COMPILE}
 .c.ln:          ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
           ${OBJCOPY} -x ${.TARGET}
 .cc.o .C.o:  .endif
 .if defined(COPTS) && !empty(COPTS:M*-g*)  
         ${COMPILE.cc} ${.IMPSRC}  .cc.po .cpp.po .cxx.po .C.po:
 .else          ${_MKTARGET_COMPILE}
         @echo ${COMPILE.cc:Q} ${.IMPSRC}          ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          ${OBJCOPY} -X ${.TARGET}
         @rm -f ${.TARGET}.o  .endif
 .endif  
   .cc.go .cpp.go .cxx.go .C.go:
 .cc.po .C.po:          ${_MKTARGET_COMPILE}
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
         ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}  
 .else  .cc.pico .cpp.pico .cxx.pico .C.pico:
         @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}          ${_MKTARGET_COMPILE}
         @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o          ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @rm -f ${.TARGET}.o          ${OBJCOPY} -x ${.TARGET}
 .endif  
   
 .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}  
         @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .f.o:  .f.o:
 .if defined(FOPTS) && !empty(FOPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.f} ${.IMPSRC}          ${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(FOPTS) || empty(FOPTS:M*-g*)
         @echo ${COMPILE.f:Q} ${.IMPSRC}          ${OBJCOPY} -x ${.TARGET}
         @${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .f.po:  .f.po:
 .if defined(FOPTS) && !empty(FOPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}          ${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(FOPTS) || empty(FOPTS:M*-g*)
         @echo ${COMPILE.f:Q} -pg ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -X ${.TARGET}
         @${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .f.so:  .f.go:
 .if defined(FOPTS) && !empty(FOPTS:M*-g*)          ${_MKTARGET_COMPILE}
           ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
   
   .f.pico:
           ${_MKTARGET_COMPILE}
         ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(FOPTS) || empty(FOPTS:M*-g*)
         @echo ${COMPILE.f:Q} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -x ${.TARGET}
         @${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .f.ln:  .f.ln:
         ${ECHO} Skipping lint for Fortran libraries.          ${_MKTARGET_COMPILE}
           @echo Skipping lint for Fortran libraries.
   
 .m.o:  .m.o:
 .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.m} ${.IMPSRC}          ${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
         @echo ${COMPILE.m:Q} ${.IMPSRC}          ${OBJCOPY} -x ${.TARGET}
         @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .m.po:  .m.po:
 .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}          ${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
         @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -X ${.TARGET}
         @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o  .endif
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  .m.go:
 .endif          ${_MKTARGET_COMPILE}
           ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .m.so:  .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
 .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)          ${OBJCOPY} -X ${.TARGET}
         ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}  .endif
 .else  
         @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}  .m.pico:
         @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o          ${_MKTARGET_COMPILE}
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         @rm -f ${.TARGET}.o  .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
 .endif          ${OBJCOPY} -x ${.TARGET}
   .endif
 .S.o .s.o:  
         @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}  .s.o:
         @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o          ${_MKTARGET_COMPILE}
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}          ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         @rm -f ${.TARGET}.o          ${OBJCOPY} -x ${.TARGET}
   
 .S.po .s.po:  .S.o:
         @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}          ${_MKTARGET_COMPILE}
         @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o          ${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}          ${OBJCOPY} -x ${.TARGET}
         @rm -f ${.TARGET}.o  
   .s.po:
 .S.so .s.so:          ${_MKTARGET_COMPILE}
         @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o          ${OBJCOPY} -X ${.TARGET}
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  .S.po:
           ${_MKTARGET_COMPILE}
 .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \          ${COMPILE.S} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
         || ${MKLINKLIB} != "no"          ${OBJCOPY} -X ${.TARGET}
   
   .s.go:
           ${_MKTARGET_COMPILE}
           ${COMPILE.s} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
   
   .S.go:
           ${_MKTARGET_COMPILE}
           ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
   
   .s.pico:
           ${_MKTARGET_COMPILE}
           ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${OBJCOPY} -x ${.TARGET}
   
   .S.pico:
           ${_MKTARGET_COMPILE}
           ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${OBJCOPY} -x ${.TARGET}
   
   .if defined(LIB)                                                        # {
   .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
           || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
 _LIBS=lib${LIB}.a  _LIBS=lib${LIB}.a
 .else  .else
 _LIBS=  _LIBS=
Line 303  _LIBS=
Line 366  _LIBS=
   
 OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}  OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
   
   STOBJS+=${OBJS}
   
   LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
   
   .if ${LIBISPRIVATE} != "no"
   # No installation is required
   libinstall::
   .endif  # ${LIBISPRIVATE} == "no"                                       # {
   
   .if ${MKDEBUGLIB} != "no"
   _LIBS+=lib${LIB}_g.a
   GOBJS+=${OBJS:.o=.go}
   DEBUGFLAGS?=-DDEBUG
   .endif
   
 .if ${MKPROFILE} != "no"  .if ${MKPROFILE} != "no"
 _LIBS+=lib${LIB}_p.a  _LIBS+=lib${LIB}_p.a
 POBJS+=${OBJS:.o=.po}  POBJS+=${OBJS:.o=.po}
   PROFFLAGS?=-DGPROF -DPROF
 .endif  .endif
   
 .if ${MKPIC} != "no"  .if ${MKPIC} != "no"                                                    # {
 .if ${MKPICLIB} == "no"  .if ${MKPICLIB} == "no"
   .if ${MKSHLIBOBJS} != "no"
   # make _pic.a, which isn't really pic,
   # since it's needed for making shared lib.
   # but don't install it.
   SOLIB=lib${LIB}_pic.a
   SOBJS+=${OBJS:.o=.pico}
   .else
 SOLIB=lib${LIB}.a  SOLIB=lib${LIB}.a
   .endif
 .else  .else
 SOLIB=lib${LIB}_pic.a  SOLIB=lib${LIB}_pic.a
 _LIBS+=${SOLIB}  _LIBS+=${SOLIB}
 SOBJS+=${OBJS:.o=.so}  SOBJS+=${OBJS:.o=.pico}
 .endif  .endif
 .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}  .if ${MKLINT} != "no" && !empty(LOBJS)
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)  
 _LIBS+=llib-l${LIB}.ln  _LIBS+=llib-l${LIB}.ln
 .endif  .endif
   
 .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \  ALLOBJS=
         || ${MKLINKLIB} != "no"  .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
 ALLOBJS=${OBJS} ${POBJS} ${SOBJS}          || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
 .else  ALLOBJS+=${STOBJS}
 ALLOBJS=${POBJS} ${SOBJS}  
 .endif  .endif
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)  ALLOBJS+=${POBJS} ${SOBJS}
   .if ${MKLINT} != "no" && !empty(LOBJS)
 ALLOBJS+=${LOBJS}  ALLOBJS+=${LOBJS}
 .endif  .endif
   .else   # !defined(LIB)                                                 # } {
   LOBJS=
   SOBJS=
   .endif  # !defined(LIB)                                                 # }
   
 .NOPATH: ${ALLOBJS} ${_LIBS} ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}  _YLSRCS=        ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
   
   .NOPATH: ${ALLOBJS} ${_LIBS} ${_YLSRCS}
   
 realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}  realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
   
   .if !target(__archivebuild)
 __archivebuild: .USE  __archivebuild: .USE
         @rm -f ${.TARGET}          ${_MKTARGET_BUILD}
         @${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`          rm -f ${.TARGET}
           ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
         ${RANLIB} ${.TARGET}          ${RANLIB} ${.TARGET}
   .endif
   
   .if !target(__archiveinstall)
 __archiveinstall: .USE  __archiveinstall: .USE
           ${_MKTARGET_INSTALL}
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
             ${UPDATE:D:U-a "${RANLIB} -t"} ${.ALLSRC} ${.TARGET}              ${empty(PRESERVE):?-a "${RANLIB} -t":} ${.ALLSRC} ${.TARGET}
   .endif
   
 __archivesymlinkpic: .USE  __archivesymlinkpic: .USE
           ${_MKTARGET_INSTALL}
         ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}          ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
   
 DPSRCS+=        ${SRCS:M*.[ly]:C/\..$/.c/}  DPSRCS+=        ${_YLSRCS}
 CLEANFILES+=    ${DPSRCS} ${YHEADER:D${SRCS:M*.y:.y=.h}}  CLEANFILES+=    ${_YLSRCS}
   
 lib${LIB}.a:: ${OBJS} __archivebuild  ${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
         @echo building standard ${LIB} library  
   lib${LIB}.a:: ${STOBJS} __archivebuild
   
 lib${LIB}_p.a:: ${POBJS} __archivebuild  lib${LIB}_p.a:: ${POBJS} __archivebuild
         @echo building profiled ${LIB} library  
   
 lib${LIB}_pic.a:: ${SOBJS} __archivebuild  lib${LIB}_pic.a:: ${SOBJS} __archivebuild
         @echo building shared object ${LIB} library  
   
 lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \  lib${LIB}_g.a:: ${GOBJS} __archivebuild
   
   
   _LIBLDOPTS=
   .if ${SHLIBDIR} != "/usr/lib"
   _LIBLDOPTS+=    -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \
                   -R${SHLIBDIR} \
                   -L${DESTDIR}${SHLIBDIR}
   .elif ${SHLIBINSTALLDIR} != "/usr/lib"
   _LIBLDOPTS+=    -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
                   -L${DESTDIR}${SHLIBINSTALLDIR}
   .endif
   
   # gcc -shared now adds -lc automatically. For libraries other than libc and
   # 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}
   .else
   LDLIBC ?= -nodefaultlibs
   .if ${LIB} == "c"
   LDADD+= -lgcc_pic
   .endif
   .endif
   .endif
   
   .if ${LIBISCXX} != "no"
   LIBCC:= ${CXX}
   .else
   LIBCC:= ${CC}
   .endif
   
   lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}      ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
         @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)          ${_MKTARGET_BUILD}
         @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}          rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
 .if defined(DESTDIR)  .if defined(DESTDIR)
         $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \          ${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}${SHLIBDIR}/ \
             ${SHLIB_LDSTARTFILE} \              ${_LIBLDOPTS} \
             --whole-archive ${SOLIB} \              -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
             --no-whole-archive ${LDADD} \              -Wl,--whole-archive ${SOLIB} \
             -L${DESTDIR}${_LIBSODIR} -L${DESTDIR}${LIBDIR} \              -Wl,--no-whole-archive ${LDADD} \
             -R${_LIBSODIR} -R${LIBDIR} \              -L${_GCC_LIBGCCDIR}
             ${SHLIB_LDENDFILE}  .else
 .else          ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \
         $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \              -o ${.TARGET} ${_LIBLDOPTS} \
             ${SHLIB_LDSTARTFILE} \              -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}
             --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \  
             ${SHLIB_LDENDFILE}  
 .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
 #  happening inside the build directory/objdir. XXX Why does  #  happening inside the build directory/objdir. XXX Why does
 #  this spend so much effort on libraries that aren't live??? XXX  #  this spend so much effort on libraries that aren't live??? XXX
         ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp  .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
       "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
           ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
         mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}          mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
         ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp  .endif
           ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
         mv -f lib${LIB}.so.tmp lib${LIB}.so          mv -f lib${LIB}.so.tmp lib${LIB}.so
 .endif  .endif
   .if ${MKSTRIPIDENT} != "no"
           ${OBJCOPY} -R .ident ${.TARGET}
   .endif
   
 .if !empty(LOBJS)  .if !empty(LOBJS)                                                       # {
 LLIBS?=         -lc  LLIBS?=         -lc
 llib-l${LIB}.ln: ${LOBJS}  llib-l${LIB}.ln: ${LOBJS}
         @echo building llib-l${LIB}.ln          ${_MKTARGET_COMPILE}
         @rm -f llib-l${LIB}.ln          rm -f llib-l${LIB}.ln
         @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}  .if defined(DESTDIR)
           ${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
   .else
           ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
 .endif  .endif
   .endif                                                                  # }
   
 cleanlib:  lint: ${LOBJS}
   .if defined(LOBJS) && !empty(LOBJS)
           ${LINT} ${LINTFLAGS} ${LOBJS}
   .endif
   
   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 ${OBJS}          rm -f lib${LIB}.a ${STOBJS}
         rm -f lib${LIB}_p.a ${POBJS}          rm -f lib${LIB}_p.a ${POBJS}
           rm -f lib${LIB}_g.a ${GOBJS}
         rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}          rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
           rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}
         rm -f llib-l${LIB}.ln ${LOBJS}          rm -f llib-l${LIB}.ln ${LOBJS}
   
 .if defined(SRCS)  
 afterdepend: .depend  
         @(TMP=/tmp/_depend$$$$; \  
             sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \  
               < .depend > $$TMP; \  
             mv $$TMP .depend)  
 .endif  
   
 .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::
   
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no"
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
   
 .if !defined(UPDATE)  .if ${MKUPDATE} == "no"
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
 ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
 .endif  .endif
Line 440  ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LI
Line 583  ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LI
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
   
 .if !defined(UPDATE)  .if ${MKUPDATE} == "no"
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)  .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
 ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
 .endif  .endif
Line 453  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${
Line 596  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${
 .endif  .endif
 .endif  .endif
   
   .if ${MKDEBUGLIB} != "no"
   libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
   .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
   
   .if ${MKUPDATE} == "no"
   .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! .MADE
   .endif
   ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! lib${LIB}_g.a __archiveinstall
   .else
   .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: .MADE
   .endif
   ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: lib${LIB}_g.a __archiveinstall
   .endif
   .endif
   
 .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"  .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
   
 .if !defined(UPDATE)  .if ${MKUPDATE} == "no"
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)  .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
 .endif  .endif
Line 479  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
Line 639  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib
 .endif  .endif
   
 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)  .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
 libinstall:: ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  _LIB_SO_TGT=            ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
 .PRECIOUS: ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  _LIB_SO_TGTLIBDIR=         ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
   
   libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
   .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
   
 .if !defined(UPDATE)  .if ${MKUPDATE} == "no"
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}! .MADE  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
 .endif  .endif
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
 .else  .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
 .endif  .endif
 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif  .endif
           ${_MKTARGET_INSTALL}
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                 ${.ALLSRC} ${.TARGET}                  ${.ALLSRC} ${.TARGET}
 .if ${_LIBSODIR} != ${LIBDIR}  .if ${_LIBSODIR} != ${LIBDIR}
         ${INSTALL_SYMLINK} ${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \          ${INSTALL_SYMLINK} -l r \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
 .endif  .endif
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
         /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}          /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
         ${INSTALL_SYMLINK} lib${LIB}.so.${SHLIB_FULLVERSION} \  .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
             ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_MAJOR}      "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
           ${INSTALL_SYMLINK} \
                   ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGT}.${SHLIB_MAJOR}
 .if ${_LIBSODIR} != ${LIBDIR}  .if ${_LIBSODIR} != ${LIBDIR}
         ${INSTALL_SYMLINK} ${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \          ${INSTALL_SYMLINK} -l r \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
   .endif
 .endif  .endif
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no"
         ${INSTALL_SYMLINK} lib${LIB}.so.${SHLIB_FULLVERSION} \          ${INSTALL_SYMLINK} \
             ${DESTDIR}${_LIBSODIR}/lib${LIB}.so                  ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGT}
 .if ${_LIBSODIR} != ${LIBDIR}  .if ${_LIBSODIR} != ${LIBDIR}
         ${INSTALL_SYMLINK} ${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \          ${INSTALL_SYMLINK} -l r \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so                  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGTLIBDIR}
 .endif  .endif
 .endif  .endif
 .endif  .endif
 .endif  .endif
   
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)  .if ${MKLINT} != "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
   
 .if !defined(UPDATE)  .if ${MKUPDATE} == "no"
 .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)  .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
 ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
 .endif  .endif
Line 535  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
Line 707  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
 .endif  .endif
 ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
 .endif  .endif
           ${_MKTARGET_INSTALL}
         ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                 ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}                  ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
 .endif  .endif
 .endif  .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>
 .include <bsd.inc.mk>  .include <bsd.inc.mk>
 .include <bsd.links.mk>  .include <bsd.links.mk>
 .include <bsd.dep.mk>  .include <bsd.dep.mk>
 .include <bsd.sys.mk>  
   
 ${TARGETS}:     # ensure existence  ${TARGETS}:     # ensure existence

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

CVSweb <webmaster@jp.NetBSD.org>