[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.2.6 and 1.301

version 1.169.2.6, 2000/09/29 19:27:00 version 1.301, 2009/12/12 21:33:50
Line 1 
Line 1 
 #       $NetBSD$  #       $NetBSD$
 #       @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94  #       @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
   
 .if !target(__initialized__)  .include <bsd.init.mk>
 __initialized__:  .include <bsd.shlib.mk>
 .if exists(${.CURDIR}/../Makefile.inc)  .include <bsd.gcc.mk>
 .include "${.CURDIR}/../Makefile.inc"  # Pull in <bsd.sys.mk> here so we can override its .c.o rule
 .endif  .include <bsd.sys.mk>
 .include <bsd.own.mk>  
 .include <bsd.obj.mk>  LIBISMODULE?=   no
 .include <bsd.depall.mk>  LIBISPRIVATE?=  no
 .MAIN:          all  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  .endif
   
 .PHONY:         checkver cleanlib libinstall  ##### Basic targets
   .PHONY:         checkver libinstall
 realinstall:    checkver libinstall  realinstall:    checkver libinstall
 clean cleandir distclean: 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
   
   ##### 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
   MKDEP_SUFFIXES?=        .o .po .so .go .ln
   
   # Use purely kernel private headers in rump builds
   .if !defined(RUMPKERNEL)
   .if empty(CPPFLAGS:M-nostdinc)
   CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
   .endif
   .if empty(CXXFLAGS:M-nostdinc++)
   CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
   .endif
   .endif
   
 .if 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
   
   DPADD+= ${SHLIB_VERSION_FILE}
   
 # 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(${NETBSDSRCDIR}/lib/checkver)
 checkver:  checkver:
         @(cd ${.CURDIR} && \          @(cd ${.CURDIR} && \
                 sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \              HOST_SH=${HOST_SH:Q} AWK=${TOOL_AWK:Q} \
                     -d ${DESTDIR}${LIBDIR} ${LIB})              ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
 .endif                      -d ${DESTDIR}${_LIBSODIR} ${LIB})
 .endif  .endif
   .endif                                                                  # }
   
 .if !target(checkver)  .if !target(checkver)
 checkver:  checkver:
 .endif  .endif
   
 print-shlib-major:  print-shlib-major:
 .if defined(SHLIB_MAJOR)  .if defined(SHLIB_MAJOR) && ${MKPIC} != "no"
         @echo ${SHLIB_MAJOR}          @echo ${SHLIB_MAJOR}
 .else  .else
         @false          @false
 .endif  .endif
   
 print-shlib-minor:  print-shlib-minor:
 .if defined(SHLIB_MINOR)  .if defined(SHLIB_MINOR) && ${MKPIC} != "no"
         @echo ${SHLIB_MINOR}          @echo ${SHLIB_MINOR}
 .else  .else
         @false          @false
 .endif  .endif
   
 print-shlib-teeny:  print-shlib-teeny:
 .if defined(SHLIB_TEENY)  .if defined(SHLIB_TEENY) && ${MKPIC} != "no"
         @echo ${SHLIB_TEENY}          @echo ${SHLIB_TEENY}
 .else  .else
         @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 66  SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB
Line 126  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.  # .so 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 .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 89  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 149  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
 # CPPICFLAGS:           flags for ${CPP} to preprocess .[sS] files for ${AS}  # FPICFLAGS:            flags for ${FC} to compile .[fF] files to .so objects.
 # CPICFLAGS:            flags for ${CC} to compile .[cC] files to .so objects.  # CPPPICFLAGS:          flags for ${CPP} to preprocess .[sS] files for ${AS}
 # CAPICFLAGS            flags for {$CC} to compiling .[Ss] files  # CPICFLAGS:            flags for ${CC} to compile .[cC] files to pic objects.
   # CSHLIBFLAGS:          flags for ${CC} to compile .[cC] files to .so 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 .so objects.
   
 .if ${MACHINE_ARCH} == "alpha"  .if ${MACHINE_ARCH} == "alpha"                                          # {
                 # Alpha-specific shared library flags  
   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} == "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
   # relocations in asm code
   FPICFLAGS ?= -fPIC
 CPICFLAGS ?= -fPIC -DPIC  CPICFLAGS ?= -fPIC -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC -DBIGPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?= -KPIC  APICFLAGS ?= -KPIC
   
 .elif ${MACHINE_ARCH} == "sparc64" && ${OBJECT_FMT} == "ELF"  .else                                                                   # } {
   
 CPICFLAGS ?= -fPIC -DPIC  # Platform-independent flags for NetBSD shared libraries
 CPPPICFLAGS?= -DPIC  
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  
 APICFLAGS ?= -KPIC  
   
 .else  
   
 # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)  
 SHLIB_LDSTARTFILE=  
 SHLIB_LDENDFILE=  
 SHLIB_SOVERSION=${SHLIB_FULLVERSION}  SHLIB_SOVERSION=${SHLIB_FULLVERSION}
 SHLIB_SHFLAGS=  SHLIB_SHFLAGS=
   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}
   
 .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  
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
   .c.go:
           ${_MKTARGET_COMPILE}
           ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
   
 .c.so:  .c.so:
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -x ${.TARGET}
         @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .c.ln:  .cc.o .cpp.o .cxx.o .C.o:
         ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}          ${_MKTARGET_COMPILE}
           ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
   .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
           ${OBJCOPY} -x ${.TARGET}
   .endif
   
 .cc.o .C.o:  .cc.po .cpp.po .cxx.po .C.po:
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.cc} ${.IMPSRC}          ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
         @echo ${COMPILE.cc:Q} ${.IMPSRC}          ${OBJCOPY} -X ${.TARGET}
         @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .cc.po .C.po:  .cc.go .cpp.go .cxx.go .C.go:
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}          ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
 .else  
         @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}  .cc.so .cpp.so .cxx.so .C.so:
         @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o          ${_MKTARGET_COMPILE}
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}          ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
         @rm -f ${.TARGET}.o  .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
           ${OBJCOPY} -x ${.TARGET}
 .endif  .endif
   
 .cc.so .C.so:  .f.o:
 .if defined(COPTS) && !empty(COPTS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(FOPTS) || empty(FOPTS:M*-g*)
         @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -x ${.TARGET}
         @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
   .f.po:
           ${_MKTARGET_COMPILE}
           ${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
   .if !defined(FOPTS) || empty(FOPTS:M*-g*)
           ${OBJCOPY} -X ${.TARGET}
   .endif
   
   .f.go:
           ${_MKTARGET_COMPILE}
           ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
   
   .f.so:
           ${_MKTARGET_COMPILE}
           ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
   .if !defined(FOPTS) || empty(FOPTS:M*-g*)
           ${OBJCOPY} -x ${.TARGET}
   .endif
   
   .f.ln:
           ${_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  
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  .endif
   
 .m.so:  .m.go:
 .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)          ${_MKTARGET_COMPILE}
         ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .else  .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
         @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${OBJCOPY} -X ${.TARGET}
         @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o  .endif
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
 .endif  
   
 .S.o .s.o:  
         @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}  
         @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
   
 .S.po .s.po:  
         @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}  
         @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -X -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
   
 .S.so .s.so:  
         @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}  
         @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o  
         @${LD} -x -r ${.TARGET}.o -o ${.TARGET}  
         @rm -f ${.TARGET}.o  
   
 .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \  .m.so:
         || ${MKLINKLIB} != "no"          ${_MKTARGET_COMPILE}
           ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
   .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
           ${OBJCOPY} -x ${.TARGET}
   .endif
   
   .s.o:
           ${_MKTARGET_COMPILE}
           ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${OBJCOPY} -x ${.TARGET}
   
   .S.o:
           ${_MKTARGET_COMPILE}
           ${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${OBJCOPY} -x ${.TARGET}
   
   .s.po:
           ${_MKTARGET_COMPILE}
           ${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${OBJCOPY} -X ${.TARGET}
   
   .S.po:
           ${_MKTARGET_COMPILE}
           ${COMPILE.S} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${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.so:
           ${_MKTARGET_COMPILE}
           ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
           ${OBJCOPY} -x ${.TARGET}
   
   .S.so:
           ${_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 273  _LIBS=
Line 369  _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=.so}
   .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}
Line 289  SOBJS+=${OBJS:.o=.so}
Line 409  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                                                                  # }
   
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"  .if ${MKLINT} != "no" && !empty(LOBJS)
 _LIBS+=llib-l${LIB}.ln  _LIBS+=llib-l${LIB}.ln
 LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  
 .endif  .endif
   
 .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \  ALLOBJS=
         || ${MKLINKLIB} != "no"  .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
 ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS}          || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
 .else  ALLOBJS+=${STOBJS}
 ALLOBJS=${POBJS} ${SOBJS} ${LOBJS}  .endif
 .endif  ALLOBJS+=${POBJS} ${SOBJS}
 .NOPATH: ${ALLOBJS} ${_LIBS}  .if ${MKLINT} != "no" && !empty(LOBJS)
   ALLOBJS+=${LOBJS}
   .endif
   .else   # !defined(LIB)                                                 # } {
   LOBJS=
   SOBJS=
   .endif  # !defined(LIB)                                                 # }
   
   _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}
   
   MKARZERO?=no
   
   .if ${MKARZERO} == "yes"
   _ARFL=crsD
   _ARRANFL=sD
   _INSTRANLIB=
   .else
   _ARFL=crs
   _ARRANFL=s
   _INSTRANLIB=${empty(PRESERVE):?-a "${RANLIB} -t":}
   .endif
   
   # If you change this, please consider reflecting the change in
   # the override in sys/rump/Makefile.rump.
   .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}
         ${RANLIB} ${.TARGET}          ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
   .endif
   
   .if !target(__archiveinstall)
 __archiveinstall: .USE  __archiveinstall: .USE
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \          ${_MKTARGET_INSTALL}
             -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}          ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
         ${RANLIB} -t ${.TARGET}              ${_INSTRANLIB} ${.ALLSRC} ${.TARGET}
         chmod ${LIBMODE} ${.TARGET}  
   
 DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}  
 CLEANFILES+=    ${DPSRCS}  
 .if defined(YHEADER)  
 CLEANFILES+=    ${SRCS:M*.y:.y=.h}  
 .endif  .endif
   
 lib${LIB}.a:: ${OBJS} __archivebuild  __archivesymlinkpic: .USE
         @echo building standard ${LIB} library          ${_MKTARGET_INSTALL}
           ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
   
   DPSRCS+=        ${_YLSRCS}
   CLEANFILES+=    ${_YLSRCS}
   
   ${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
   
   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
   
   _LDADD.lib${LIB}=       ${LDADD} ${LDADD.lib${LIB}}
   _LDFLAGS.lib${LIB}=     ${LDFLAGS} ${LDFLAGS.lib${LIB}}
   
   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} \              -Wl,-x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
             --whole-archive ${SOLIB} \              -Wl,--whole-archive ${SOLIB} \
             --no-whole-archive ${LDADD} \              -Wl,--no-whole-archive ${_LDADD.lib${LIB}} \
             -L${DESTDIR}${LIBDIR} -R${LIBDIR} \              ${_LIBLDOPTS} ${_LDFLAGS.lib${LIB}} \
             ${SHLIB_LDENDFILE}              -L${_GCC_LIBGCCDIR}
 .else  .else
         $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \          ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${_LDFLAGS.lib${LIB}} \
             ${SHLIB_LDSTARTFILE} \              -o ${.TARGET} ${_LIBLDOPTS} \
             --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \              -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${_LDADD.lib${LIB}}
             ${SHLIB_LDENDFILE}  
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
         rm -f lib${LIB}.so.${SHLIB_MAJOR}  #  We don't use INSTALL_SYMLINK here because this is just
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}  #  happening inside the build directory/objdir. XXX Why does
         rm -f lib${LIB}.so  #  this spend so much effort on libraries that aren't live??? XXX
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so  .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}
   .endif
           ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
           mv -f lib${LIB}.so.tmp lib${LIB}.so
   .endif
   .if ${MKSTRIPIDENT} != "no"
           ${OBJCOPY} -R .ident ${.TARGET}
 .endif  .endif
   
   .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                                                                  # }
   
 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)  
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a  
 .endif  
   
   .if ${MKUPDATE} == "no"
   .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
   .endif
   ${DESTDIR}${LIBDIR}/lib${LIB}.a! lib${LIB}.a __archiveinstall
   .else
 .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
 ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall  ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
 .endif  .endif
   .endif
   
 .if ${MKPROFILE} != "no"  .if ${MKPROFILE} != "no"
 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)  
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a  
 .endif  
   
   .if ${MKUPDATE} == "no"
   .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
   .endif
   ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! lib${LIB}_p.a __archiveinstall
   .else
 .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
 ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall  ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
 .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)  
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  
 .endif  
   
   .if ${MKUPDATE} == "no"
   .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
   ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
   .endif
   .if ${MKPICLIB} == "no"
   ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}.a __archivesymlinkpic
   .else
   ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}_pic.a __archiveinstall
   .endif
   .else
 .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
 .if ${MKPICLIB} == "no"  .if ${MKPICLIB} == "no"
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}.a __archivesymlinkpic
         rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  
         ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a  
 .else  .else
 ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall  ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
 .endif  .endif
 .endif  .endif
   .endif
   
 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)  .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  _LIB_SO_TGT=            ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
 .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  _LIB_SO_TGTLIBDIR=         ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
 .if !defined(UPDATE)  
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}  libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
 .endif  .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
   
   .if ${MKUPDATE} == "no"
   .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
   ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
   .endif
   ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
   .else
 .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})  .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE  ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
   .endif
   ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
   .endif
           ${_MKTARGET_INSTALL}
           ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                   ${.ALLSRC} ${.TARGET}
   .if ${_LIBSODIR} != ${LIBDIR}
           ${INSTALL_SYMLINK} -l r \
                   ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
 .endif  .endif
 ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}  
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \  
             -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}  
 .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)  .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
         /sbin/ldconfig -m ${LIBDIR}          /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
 .endif  .endif
 .if ${OBJECT_FMT} == "ELF"  .if ${OBJECT_FMT} == "ELF"
         rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}  .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \      "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
             ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}          ${INSTALL_SYMLINK} \
         rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so                  ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGT}.${SHLIB_MAJOR}
   .if ${_LIBSODIR} != ${LIBDIR}
           ${INSTALL_SYMLINK} -l r \
                   ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
   .endif
   .endif
 .if ${MKLINKLIB} != "no"  .if ${MKLINKLIB} != "no"
         ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \          ${INSTALL_SYMLINK} \
             ${DESTDIR}${LIBDIR}/lib${LIB}.so                  ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGT}
   .if ${_LIBSODIR} != ${LIBDIR}
           ${INSTALL_SYMLINK} -l r \
                   ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                   ${_LIB_SO_TGTLIBDIR}
   .endif
 .endif  .endif
 .endif  .endif
 .endif  .endif
   
 .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"  .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)  
 .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln  
 .endif  
   
   .if ${MKUPDATE} == "no"
   .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
   ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
   .endif
   ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! llib-l${LIB}.ln
   .else
 .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
 ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \  
             -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}  
 .endif  
 .endif  .endif
           ${_MKTARGET_INSTALL}
           ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
                   ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
   .endif
   .endif  # !target(libinstall)                                           # }
   
   ##### 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>  
   
 # Make sure all of the standard targets are defined, even if they do nothing.  ${TARGETS}:     # ensure existence
 lint regress:  

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

CVSweb <webmaster@jp.NetBSD.org>