[BACK]Return to bsd.lib.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Annotation of src/share/mk/bsd.lib.mk, Revision 1.292

1.292   ! pooka       1: #      $NetBSD: bsd.lib.mk,v 1.291 2008/12/06 19:32:05 mrg Exp $
1.92      mikel       2: #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
1.1       cgd         3:
1.188     tv          4: .include <bsd.init.mk>
1.207     thorpej     5: .include <bsd.shlib.mk>
1.219     thorpej     6: .include <bsd.gcc.mk>
1.227     lukem       7: # Pull in <bsd.sys.mk> here so we can override its .c.o rule
                      8: .include <bsd.sys.mk>
1.97      mycroft     9:
1.282     lukem      10: LIBISMODULE?=  no
1.281     lukem      11: LIBISPRIVATE?= no
1.291     mrg        12: LIBISCXX?=     no
1.281     lukem      13:
1.282     lukem      14: _LIB_PREFIX=   lib
                     15:
                     16: .if ${LIBISMODULE} != "no"
                     17: _LIB_PREFIX=   # empty
                     18: MKDEBUGLIB:=   no
                     19: MKLINT:=       no
                     20: MKPICINSTALL:= no
                     21: MKPROFILE:=    no
                     22: MKSTATICLIB:=  no
                     23: .endif
                     24:
1.281     lukem      25: .if ${LIBISPRIVATE} != "no"
1.280     lukem      26: MKDEBUGLIB:=   no
                     27: MKLINT:=       no
1.290     cube       28: MKPICINSTALL:= no
                     29: . if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
                     30: MKSTATICLIB:=  no
                     31: . else
1.280     lukem      32: MKPIC:=                no
1.290     cube       33: . endif
1.280     lukem      34: MKPROFILE:=    no
                     35: .endif
                     36:
1.188     tv         37: ##### Basic targets
1.246     lukem      38: .PHONY:                checkver libinstall
1.143     erh        39: realinstall:   checkver libinstall
1.183     tv         40: clean:         cleanlib
1.232     erh        41:
                     42: ##### LIB specific flags.
1.287     christos   43: # XXX: This is needed for programs that link with .a libraries
                     44: # Perhaps a more correct solution is to always generate _pic.a
                     45: # files or always have a shared library.
                     46: .if defined(MKPIE) && (${MKPIE} != "no")
                     47: CFLAGS+=        ${PIE_CFLAGS}
1.288     christos   48: AFLAGS+=        ${PIE_AFLAGS}
1.287     christos   49: .endif
1.267     mrg        50: COPTS+=     ${COPTS.lib${LIB}}
1.232     erh        51: CPPFLAGS+=  ${CPPFLAGS.lib${LIB}}
                     52: CXXFLAGS+=  ${CXXFLAGS.lib${LIB}}
1.267     mrg        53: OBJCOPTS+=  ${OBJCOPTS.lib${LIB}}
1.232     erh        54: LDADD+=     ${LDADD.lib${LIB}}
1.233     erh        55: LDFLAGS+=   ${LDFLAGS.lib${LIB}}
                     56: LDSTATIC+=  ${LDSTATIC.lib${LIB}}
1.1       cgd        57:
1.256     lukem      58: ##### Libraries that this may depend upon.
                     59: .if defined(LIBDPLIBS) && ${MKPIC} != "no"                             # {
                     60: .for _lib _dir in ${LIBDPLIBS}
                     61: .if !defined(LIBDO.${_lib})
                     62: LIBDO.${_lib}!=        cd ${_dir} && ${PRINTOBJDIR}
                     63: .MAKEOVERRIDES+=LIBDO.${_lib}
                     64: .endif
                     65: LDADD+=                -L${LIBDO.${_lib}} -l${_lib}
                     66: DPADD+=                ${LIBDO.${_lib}}/lib${_lib}.so
                     67: .endfor
                     68: .endif                                                                 # }
                     69:
1.188     tv         70: ##### Build and install rules
1.285     christos   71: MKDEP_SUFFIXES?=       .o .po .so .go .ln
1.292   ! pooka      72:
        !            73: # Use purely kernel private headers in rump builds
        !            74: .if !defined(RUMPKERNEL)
1.192     thorpej    75: CPPFLAGS+=     ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
1.225     mrg        76: CXXFLAGS+=     ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
1.292   ! pooka      77: .endif
1.190     tv         78:
1.252     lukem      79: .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE})             # {
1.154     simonb     80: SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
                     81: SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
1.171     christos   82: SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
1.143     erh        83:
                     84: # Check for higher installed library versions.
1.145     erh        85: .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
1.201     lukem      86:        exists(${NETBSDSRCDIR}/lib/checkver)
1.143     erh        87: checkver:
1.144     erh        88:        @(cd ${.CURDIR} && \
1.289     apb        89:            HOST_SH=${HOST_SH:Q} AWK=${TOOL_AWK:Q} \
1.239     lukem      90:            ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
1.195     lukem      91:                    -d ${DESTDIR}${_LIBSODIR} ${LIB})
1.173     christos   92: .endif
1.252     lukem      93: .endif                                                                 # }
1.173     christos   94:
                     95: .if !target(checkver)
1.143     erh        96: checkver:
                     97: .endif
1.173     christos   98:
1.169     thorpej    99: print-shlib-major:
1.185     tv        100: .if defined(SHLIB_MAJOR) && ${MKPIC} != "no"
1.169     thorpej   101:        @echo ${SHLIB_MAJOR}
1.173     christos  102: .else
                    103:        @false
                    104: .endif
1.169     thorpej   105:
                    106: print-shlib-minor:
1.185     tv        107: .if defined(SHLIB_MINOR) && ${MKPIC} != "no"
1.169     thorpej   108:        @echo ${SHLIB_MINOR}
1.173     christos  109: .else
                    110:        @false
                    111: .endif
1.171     christos  112:
                    113: print-shlib-teeny:
1.185     tv        114: .if defined(SHLIB_TEENY) && ${MKPIC} != "no"
1.171     christos  115:        @echo ${SHLIB_TEENY}
1.143     erh       116: .else
1.169     thorpej   117:        @false
1.173     christos  118: .endif
1.169     thorpej   119:
1.252     lukem     120: .if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)                                # {
1.173     christos  121: .if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
                    122: .if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
                    123: SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
                    124: .else
                    125: SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
                    126: .endif
                    127: .else
                    128: SHLIB_FULLVERSION=${SHLIB_MAJOR}
                    129: .endif
1.252     lukem     130: .endif                                                                 # }
1.1       cgd       131:
1.101     mycroft   132: # add additional suffixes not exported.
                    133: # .po is used for profiling object files.
                    134: # .so is used for PIC object files.
1.266     christos  135: .SUFFIXES: .out .a .ln .so .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r .y .l .cl .p .h
1.118     lukem     136: .SUFFIXES: .sh .m4 .m
1.82      mikel     137:
1.86      jonathan  138:
                    139: # Set PICFLAGS to cc flags for producing position-independent code,
                    140: # if not already set.  Includes -DPIC, if required.
                    141:
1.164     simonb    142: # Data-driven table using make variables to control how shared libraries
1.86      jonathan  143: # are built for different platforms and object formats.
1.125     jonathan  144: # OBJECT_FMT:          currently either "ELF" or "a.out", from <bsd.own.mk>
1.164     simonb    145: # SHLIB_SOVERSION:     version number to be compiled into a shared library
                    146: #                      via -soname. Usualy ${SHLIB_MAJOR} on ELF.
1.173     christos  147: #                      NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
                    148: #                      [.${SHLIB_TEENY}]]
1.164     simonb    149: # SHLIB_SHFLAGS:       Flags to tell ${LD} to emit shared library.
1.123     jonathan  150: #                      with ELF, also set shared-lib version for ld.so.
                    151: # SHLIB_LDSTARTFILE:   support .o file, call C++ file-level constructors
                    152: # SHLIB_LDENDFILE:     support .o file, call C++ file-level destructors
1.179     dmcmahil  153: # FPICFLAGS:           flags for ${FC} to compile .[fF] files to .so objects.
1.271     tsutsui   154: # CPPPICFLAGS:         flags for ${CPP} to preprocess .[sS] files for ${AS}
1.205     yamt      155: # CPICFLAGS:           flags for ${CC} to compile .[cC] files to pic objects.
                    156: # CSHLIBFLAGS:         flags for ${CC} to compile .[cC] files to .so objects.
                    157: #                      (usually includes ${CPICFLAGS})
                    158: # CAPICFLAGS:          flags for ${CC} to compiling .[Ss] files
1.107     jonathan  159: #                      (usually just ${CPPPICFLAGS} ${CPICFLAGS})
1.164     simonb    160: # APICFLAGS:           flags for ${AS} to assemble .[sS] to .so objects.
1.86      jonathan  161:
1.252     lukem     162: .if ${MACHINE_ARCH} == "alpha"                                         # {
1.209     thorpej   163:
1.179     dmcmahil  164: FPICFLAGS ?= -fPIC
1.165     dmcmahil  165: CPICFLAGS ?= -fPIC -DPIC
1.222     lukem     166: CPPPICFLAGS?= -DPIC
1.107     jonathan  167: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
                    168: APICFLAGS ?=
1.209     thorpej   169:
1.175     mrg       170: .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
1.252     lukem     171:        ${OBJECT_FMT} == "ELF"                                          # } {
1.209     thorpej   172:
1.222     lukem     173: # If you use -fPIC you need to define BIGPIC to turn on 32-bit
1.202     eeh       174: # relocations in asm code
1.179     dmcmahil  175: FPICFLAGS ?= -fPIC
1.165     dmcmahil  176: CPICFLAGS ?= -fPIC -DPIC
1.202     eeh       177: CPPPICFLAGS?= -DPIC -DBIGPIC
1.150     christos  178: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
1.203     eeh       179: APICFLAGS ?= -KPIC
1.204     fredette  180:
1.252     lukem     181: .else                                                                  # } {
1.86      jonathan  182:
1.244     skrll     183: # Platform-independent flags for NetBSD shared libraries
1.171     christos  184: SHLIB_SOVERSION=${SHLIB_FULLVERSION}
1.125     jonathan  185: SHLIB_SHFLAGS=
1.179     dmcmahil  186: FPICFLAGS ?= -fPIC
1.165     dmcmahil  187: CPICFLAGS?= -fPIC -DPIC
1.222     lukem     188: CPPPICFLAGS?= -DPIC
1.107     jonathan  189: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
                    190: APICFLAGS?= -k
1.86      jonathan  191:
1.252     lukem     192: .endif                                                                 # }
1.160     simonb    193:
1.205     yamt      194: .if ${MKPICLIB} != "no"
                    195: CSHLIBFLAGS+= ${CPICFLAGS}
                    196: .endif
                    197:
                    198: .if defined(CSHLIBFLAGS) && !empty(CSHLIBFLAGS)
                    199: MKSHLIBOBJS= yes
                    200: .else
                    201: MKSHLIBOBJS= no
                    202: .endif
                    203:
1.123     jonathan  204: # Platform-independent linker flags for ELF shared libraries
1.148     lukem     205: .if ${OBJECT_FMT} == "ELF"
1.182     mrg       206: SHLIB_SOVERSION=       ${SHLIB_MAJOR}
1.282     lukem     207: SHLIB_SHFLAGS=         -Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
1.272     christos  208: SHLIB_SHFLAGS+=                -Wl,--warn-shared-textrel
1.219     thorpej   209: SHLIB_LDSTARTFILE?=    ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
                    210: SHLIB_LDENDFILE?=      ${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
1.123     jonathan  211: .endif
1.86      jonathan  212:
1.82      mikel     213: CFLAGS+=       ${COPTS}
1.267     mrg       214: OBJCFLAGS+=    ${OBJCOPTS}
1.257     simonb    215: AFLAGS+=       ${COPTS}
1.179     dmcmahil  216: FFLAGS+=       ${FOPTS}
1.1       cgd       217:
                    218: .c.o:
1.238     lukem     219:        ${_MKTARGET_COMPILE}
1.263     dsl       220:        ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.270     martin    221: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263     dsl       222:        ${OBJCOPY} -x ${.TARGET}
1.153     christos  223: .endif
1.1       cgd       224:
                    225: .c.po:
1.238     lukem     226:        ${_MKTARGET_COMPILE}
1.263     dsl       227:        ${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
1.270     martin    228: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263     dsl       229:        ${OBJCOPY} -X ${.TARGET}
1.153     christos  230: .endif
1.17      mycroft   231:
1.266     christos  232: .c.go:
                    233:        ${_MKTARGET_COMPILE}
                    234:        ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
                    235:
1.27      pk        236: .c.so:
1.238     lukem     237:        ${_MKTARGET_COMPILE}
1.263     dsl       238:        ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
1.270     martin    239: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263     dsl       240:        ${OBJCOPY} -x ${.TARGET}
1.153     christos  241: .endif
1.27      pk        242:
1.223     lukem     243: .cc.o .cpp.o .cxx.o .C.o:
1.238     lukem     244:        ${_MKTARGET_COMPILE}
1.263     dsl       245:        ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.270     martin    246: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263     dsl       247:        ${OBJCOPY} -x ${.TARGET}
1.153     christos  248: .endif
1.17      mycroft   249:
1.266     christos  250: .cc.po .cpp.po .cxx.po .C.po:
1.238     lukem     251:        ${_MKTARGET_COMPILE}
1.263     dsl       252:        ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
1.270     martin    253: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263     dsl       254:        ${OBJCOPY} -X ${.TARGET}
1.153     christos  255: .endif
1.28      cgd       256:
1.266     christos  257: .cc.go .cpp.go .cxx.go .C.go:
                    258:        ${_MKTARGET_COMPILE}
                    259:        ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
                    260:
1.223     lukem     261: .cc.so .cpp.so .cxx.so .C.so:
1.238     lukem     262:        ${_MKTARGET_COMPILE}
1.263     dsl       263:        ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
1.270     martin    264: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263     dsl       265:        ${OBJCOPY} -x ${.TARGET}
1.153     christos  266: .endif
1.118     lukem     267:
1.179     dmcmahil  268: .f.o:
1.238     lukem     269:        ${_MKTARGET_COMPILE}
1.263     dsl       270:        ${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
                    271: .if !defined(FOPTS) || empty(FOPTS:M*-g*)
                    272:        ${OBJCOPY} -x ${.TARGET}
1.179     dmcmahil  273: .endif
                    274:
                    275: .f.po:
1.238     lukem     276:        ${_MKTARGET_COMPILE}
1.263     dsl       277:        ${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
                    278: .if !defined(FOPTS) || empty(FOPTS:M*-g*)
                    279:        ${OBJCOPY} -X ${.TARGET}
1.179     dmcmahil  280: .endif
                    281:
1.266     christos  282: .f.go:
                    283:        ${_MKTARGET_COMPILE}
                    284:        ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
                    285:
1.179     dmcmahil  286: .f.so:
1.238     lukem     287:        ${_MKTARGET_COMPILE}
1.263     dsl       288:        ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    289: .if !defined(FOPTS) || empty(FOPTS:M*-g*)
                    290:        ${OBJCOPY} -x ${.TARGET}
1.179     dmcmahil  291: .endif
                    292:
                    293: .f.ln:
1.238     lukem     294:        ${_MKTARGET_COMPILE}
1.217     wiz       295:        @echo Skipping lint for Fortran libraries.
1.179     dmcmahil  296:
1.118     lukem     297: .m.o:
1.238     lukem     298:        ${_MKTARGET_COMPILE}
1.267     mrg       299:        ${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.263     dsl       300: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
                    301:        ${OBJCOPY} -x ${.TARGET}
1.153     christos  302: .endif
1.118     lukem     303:
                    304: .m.po:
1.238     lukem     305:        ${_MKTARGET_COMPILE}
1.267     mrg       306:        ${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.263     dsl       307: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
                    308:        ${OBJCOPY} -X ${.TARGET}
1.153     christos  309: .endif
1.118     lukem     310:
1.266     christos  311: .m.go:
                    312:        ${_MKTARGET_COMPILE}
1.267     mrg       313:        ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.266     christos  314: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
                    315:        ${OBJCOPY} -X ${.TARGET}
                    316: .endif
                    317:
1.118     lukem     318: .m.so:
1.238     lukem     319:        ${_MKTARGET_COMPILE}
1.267     mrg       320:        ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.263     dsl       321: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
                    322:        ${OBJCOPY} -x ${.TARGET}
1.153     christos  323: .endif
1.1       cgd       324:
1.251     lukem     325: .s.o:
1.238     lukem     326:        ${_MKTARGET_COMPILE}
1.263     dsl       327:        ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    328:        ${OBJCOPY} -x ${.TARGET}
1.1       cgd       329:
1.251     lukem     330: .S.o:
                    331:        ${_MKTARGET_COMPILE}
1.263     dsl       332:        ${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    333:        ${OBJCOPY} -x ${.TARGET}
1.251     lukem     334:
                    335: .s.po:
                    336:        ${_MKTARGET_COMPILE}
1.263     dsl       337:        ${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    338:        ${OBJCOPY} -X ${.TARGET}
1.251     lukem     339:
                    340: .S.po:
1.238     lukem     341:        ${_MKTARGET_COMPILE}
1.263     dsl       342:        ${COMPILE.S} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    343:        ${OBJCOPY} -X ${.TARGET}
1.1       cgd       344:
1.266     christos  345: .s.go:
                    346:        ${_MKTARGET_COMPILE}
                    347:        ${COMPILE.s} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    348:
                    349: .S.go:
                    350:        ${_MKTARGET_COMPILE}
                    351:        ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    352:
1.251     lukem     353: .s.so:
                    354:        ${_MKTARGET_COMPILE}
1.263     dsl       355:        ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    356:        ${OBJCOPY} -x ${.TARGET}
1.251     lukem     357:
                    358: .S.so:
1.238     lukem     359:        ${_MKTARGET_COMPILE}
1.263     dsl       360:        ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
                    361:        ${OBJCOPY} -x ${.TARGET}
1.27      pk        362:
1.252     lukem     363: .if defined(LIB)                                                       # {
1.234     lukem     364: .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
                    365:        || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
1.130     tv        366: _LIBS=lib${LIB}.a
                    367: .else
                    368: _LIBS=
                    369: .endif
1.58      cgd       370:
1.167     matt      371: OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
1.158     christos  372:
1.255     thorpej   373: STOBJS+=${OBJS}
                    374:
1.280     lukem     375: LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
                    376:
1.281     lukem     377: .if ${LIBISPRIVATE} != "no"
1.252     lukem     378: # No installation is required
                    379: libinstall::
1.290     cube      380: .endif # ${LIBISPRIVATE} == "no"                                       # {
1.252     lukem     381:
1.268     lukem     382: .if ${MKDEBUGLIB} != "no"
1.266     christos  383: _LIBS+=lib${LIB}_g.a
                    384: GOBJS+=${OBJS:.o=.go}
                    385: DEBUGFLAGS?=-DDEBUG
                    386: .endif
                    387:
1.149     lukem     388: .if ${MKPROFILE} != "no"
1.130     tv        389: _LIBS+=lib${LIB}_p.a
1.167     matt      390: POBJS+=${OBJS:.o=.po}
1.262     christos  391: PROFFLAGS?=-DGPROF -DPROF
1.1       cgd       392: .endif
                    393:
1.252     lukem     394: .if ${MKPIC} != "no"                                                   # {
1.160     simonb    395: .if ${MKPICLIB} == "no"
1.205     yamt      396: .if ${MKSHLIBOBJS} != "no"
                    397: # make _pic.a, which isn't really pic,
                    398: # since it's needed for making shared lib.
                    399: # but don't install it.
                    400: SOLIB=lib${LIB}_pic.a
                    401: SOBJS+=${OBJS:.o=.so}
                    402: .else
1.160     simonb    403: SOLIB=lib${LIB}.a
1.205     yamt      404: .endif
1.160     simonb    405: .else
                    406: SOLIB=lib${LIB}_pic.a
                    407: _LIBS+=${SOLIB}
1.167     matt      408: SOBJS+=${OBJS:.o=.so}
1.160     simonb    409: .endif
1.171     christos  410: .if defined(SHLIB_FULLVERSION)
                    411: _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
1.27      pk        412: .endif
1.252     lukem     413: .endif                                                                 # }
1.27      pk        414:
1.279     lukem     415: .if ${MKLINT} != "no" && !empty(LOBJS)
1.58      cgd       416: _LIBS+=llib-l${LIB}.ln
1.215     christos  417: .endif
1.27      pk        418:
1.234     lukem     419: ALLOBJS=
                    420: .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
                    421:        || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
1.255     thorpej   422: ALLOBJS+=${STOBJS}
1.179     dmcmahil  423: .endif
1.234     lukem     424: ALLOBJS+=${POBJS} ${SOBJS}
1.279     lukem     425: .if ${MKLINT} != "no" && !empty(LOBJS)
1.179     dmcmahil  426: ALLOBJS+=${LOBJS}
1.216     christos  427: .endif
1.252     lukem     428: .else  # !defined(LIB)                                                 # } {
1.216     christos  429: LOBJS=
                    430: SOBJS=
1.252     lukem     431: .endif # !defined(LIB)                                                 # }
1.186     tv        432:
1.254     lukem     433: _YLSRCS=       ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
1.253     christos  434:
                    435: .NOPATH: ${ALLOBJS} ${_LIBS} ${_YLSRCS}
1.158     christos  436:
1.162     mycroft   437: realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
1.1       cgd       438:
1.243     rtr       439: .if !target(__archivebuild)
1.90      christos  440: __archivebuild: .USE
1.238     lukem     441:        ${_MKTARGET_BUILD}
1.236     lukem     442:        rm -f ${.TARGET}
1.228     lukem     443:        ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.89      christos  444:        ${RANLIB} ${.TARGET}
1.243     rtr       445: .endif
1.89      christos  446:
1.243     rtr       447: .if !target(__archiveinstall)
1.89      christos  448: __archiveinstall: .USE
1.238     lukem     449:        ${_MKTARGET_INSTALL}
1.198     lukem     450:        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.269     dbj       451:            ${empty(PRESERVE):?-a "${RANLIB} -t":} ${.ALLSRC} ${.TARGET}
1.243     rtr       452: .endif
1.89      christos  453:
1.197     mycroft   454: __archivesymlinkpic: .USE
1.238     lukem     455:        ${_MKTARGET_INSTALL}
1.264     jwise     456:        ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
1.197     mycroft   457:
1.253     christos  458: DPSRCS+=       ${_YLSRCS}
                    459: CLEANFILES+=   ${_YLSRCS}
1.230     lukem     460:
1.266     christos  461: ${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
1.103     mycroft   462:
1.255     thorpej   463: lib${LIB}.a:: ${STOBJS} __archivebuild
1.1       cgd       464:
1.89      christos  465: lib${LIB}_p.a:: ${POBJS} __archivebuild
1.1       cgd       466:
1.89      christos  467: lib${LIB}_pic.a:: ${SOBJS} __archivebuild
1.27      pk        468:
1.266     christos  469: lib${LIB}_g.a:: ${GOBJS} __archivebuild
                    470:
1.235     lukem     471:
                    472: _LIBLDOPTS=
                    473: .if ${SHLIBDIR} != "/usr/lib"
                    474: _LIBLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \
                    475:                -R${SHLIBDIR} \
                    476:                -L${DESTDIR}${SHLIBDIR}
                    477: .elif ${SHLIBINSTALLDIR} != "/usr/lib"
                    478: _LIBLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
                    479:                -L${DESTDIR}${SHLIBINSTALLDIR}
                    480: .endif
                    481:
1.277     christos  482: # gcc -shared now adds -lc automatically. For libraries other than libc and
                    483: # libgcc* we add as a dependency the installed shared libc. For libc and
                    484: # libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that
                    485: # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not
                    486: # to add standard libraries, not the linker.
1.276     christos  487: .if !defined(LIB)
1.274     christos  488: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.276     christos  489: .else
1.278     simonb    490: .if ${LIB} != "c" && ${LIB:Mgcc*} == ""
1.276     christos  491: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.277     christos  492: .else
1.278     simonb    493: LDLIBC ?= -nodefaultlibs
                    494: .if ${LIB} == "c"
                    495: LDADD+= -lgcc_pic
                    496: .endif
1.276     christos  497: .endif
1.274     christos  498: .endif
                    499:
1.291     mrg       500: .if ${LIBISCXX} != "no"
                    501: LIBCC:=        ${CXX}
                    502: .else
                    503: LIBCC:=        ${CC}
                    504: .endif
                    505:
1.274     christos  506: lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
1.88      cgd       507:     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.238     lukem     508:        ${_MKTARGET_BUILD}
1.236     lukem     509:        rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
1.152     fair      510: .if defined(DESTDIR)
1.291     mrg       511:        ${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
1.235     lukem     512:            ${_LIBLDOPTS} \
1.231     lukem     513:            -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
1.221     drochner  514:            -Wl,--whole-archive ${SOLIB} \
                    515:            -Wl,--no-whole-archive ${LDADD} \
1.277     christos  516:            -L${_GCC_LIBGCCDIR}
1.221     drochner  517: .else
1.291     mrg       518:        ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \
1.277     christos  519:            -o ${.TARGET} ${_LIBLDOPTS} \
                    520:            -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}
1.152     fair      521: .endif
1.148     lukem     522: .if ${OBJECT_FMT} == "ELF"
1.196     lukem     523: #  We don't use INSTALL_SYMLINK here because this is just
                    524: #  happening inside the build directory/objdir. XXX Why does
                    525: #  this spend so much effort on libraries that aren't live??? XXX
1.284     lukem     526: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
                    527:     "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.241     matt      528:        ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
1.177     mycroft   529:        mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
1.283     lukem     530: .endif
1.241     matt      531:        ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
1.177     mycroft   532:        mv -f lib${LIB}.so.tmp lib${LIB}.so
1.133     tv        533: .endif
1.286     joerg     534: .if ${MKSTRIPIDENT} != "no"
                    535:        ${OBJCOPY} -R .ident ${.TARGET}
                    536: .endif
1.35      pk        537:
1.252     lukem     538: .if !empty(LOBJS)                                                      # {
1.103     mycroft   539: LLIBS?=                -lc
1.58      cgd       540: llib-l${LIB}.ln: ${LOBJS}
1.238     lukem     541:        ${_MKTARGET_COMPILE}
1.236     lukem     542:        rm -f llib-l${LIB}.ln
1.206     thorpej   543: .if defined(DESTDIR)
1.228     lukem     544:        ${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
1.206     thorpej   545: .else
1.228     lukem     546:        ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
1.206     thorpej   547: .endif
1.252     lukem     548: .endif                                                                 # }
1.1       cgd       549:
1.280     lukem     550: lint: ${LOBJS}
                    551: .if defined(LOBJS) && !empty(LOBJS)
                    552:        ${LINT} ${LINTFLAGS} ${LOBJS}
                    553: .endif
                    554:
1.246     lukem     555: cleanlib: .PHONY
1.48      mycroft   556:        rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
1.255     thorpej   557:        rm -f lib${LIB}.a ${STOBJS}
1.59      cgd       558:        rm -f lib${LIB}_p.a ${POBJS}
1.266     christos  559:        rm -f lib${LIB}_g.a ${GOBJS}
1.133     tv        560:        rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
1.266     christos  561:        rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}
1.59      cgd       562:        rm -f llib-l${LIB}.ln ${LOBJS}
1.1       cgd       563:
1.252     lukem     564:
                    565: .if !target(libinstall)                                                        # {
1.148     lukem     566: # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
1.139     tv        567: libinstall::
                    568:
1.234     lukem     569: .if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no"
1.89      christos  570: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.168     mycroft   571: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.197     mycroft   572:
1.269     dbj       573: .if ${MKUPDATE} == "no"
1.197     mycroft   574: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
                    575: ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
1.89      christos  576: .endif
1.197     mycroft   577: ${DESTDIR}${LIBDIR}/lib${LIB}.a! lib${LIB}.a __archiveinstall
                    578: .else
1.157     fredb     579: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
1.89      christos  580: ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
                    581: .endif
                    582: ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
1.130     tv        583: .endif
1.197     mycroft   584: .endif
1.89      christos  585:
1.149     lukem     586: .if ${MKPROFILE} != "no"
1.89      christos  587: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.168     mycroft   588: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.197     mycroft   589:
1.269     dbj       590: .if ${MKUPDATE} == "no"
1.197     mycroft   591: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
                    592: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
1.32      pk        593: .endif
1.197     mycroft   594: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! lib${LIB}_p.a __archiveinstall
                    595: .else
1.157     fredb     596: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
1.89      christos  597: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
                    598: .endif
                    599: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
                    600: .endif
1.197     mycroft   601: .endif
1.89      christos  602:
1.268     lukem     603: .if ${MKDEBUGLIB} != "no"
1.266     christos  604: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
                    605: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
                    606:
1.269     dbj       607: .if ${MKUPDATE} == "no"
1.266     christos  608: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
                    609: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! .MADE
                    610: .endif
                    611: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! lib${LIB}_g.a __archiveinstall
                    612: .else
                    613: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
                    614: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: .MADE
                    615: .endif
                    616: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: lib${LIB}_g.a __archiveinstall
                    617: .endif
                    618: .endif
                    619:
1.149     lukem     620: .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
1.168     mycroft   621: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.160     simonb    622: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.197     mycroft   623:
1.269     dbj       624: .if ${MKUPDATE} == "no"
1.197     mycroft   625: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
                    626: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
1.89      christos  627: .endif
1.197     mycroft   628: .if ${MKPICLIB} == "no"
                    629: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}.a __archivesymlinkpic
                    630: .else
                    631: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}_pic.a __archiveinstall
                    632: .endif
                    633: .else
1.157     fredb     634: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
1.89      christos  635: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
1.33      pk        636: .endif
1.160     simonb    637: .if ${MKPICLIB} == "no"
1.197     mycroft   638: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}.a __archivesymlinkpic
1.160     simonb    639: .else
1.89      christos  640: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
1.160     simonb    641: .endif
1.89      christos  642: .endif
1.197     mycroft   643: .endif
1.89      christos  644:
1.171     christos  645: .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
1.282     lukem     646: _LIB_SO_TGT=           ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
                    647: _LIB_SO_TGTLIBDIR=        ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
                    648:
                    649: libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
                    650: .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
1.197     mycroft   651:
1.269     dbj       652: .if ${MKUPDATE} == "no"
1.197     mycroft   653: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282     lukem     654: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
1.89      christos  655: .endif
1.282     lukem     656: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
1.197     mycroft   657: .else
1.171     christos  658: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282     lukem     659: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
1.89      christos  660: .endif
1.282     lukem     661: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
1.197     mycroft   662: .endif
1.238     lukem     663:        ${_MKTARGET_INSTALL}
1.188     tv        664:        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264     jwise     665:                ${.ALLSRC} ${.TARGET}
1.195     lukem     666: .if ${_LIBSODIR} != ${LIBDIR}
1.282     lukem     667:        ${INSTALL_SYMLINK} -l r \
                    668:                ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                    669:                ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
1.195     lukem     670: .endif
1.148     lukem     671: .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
1.195     lukem     672:        /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
1.146     thorpej   673: .endif
1.148     lukem     674: .if ${OBJECT_FMT} == "ELF"
1.284     lukem     675: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
                    676:     "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.264     jwise     677:        ${INSTALL_SYMLINK} \
1.284     lukem     678:                ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282     lukem     679:                ${_LIB_SO_TGT}.${SHLIB_MAJOR}
1.195     lukem     680: .if ${_LIBSODIR} != ${LIBDIR}
1.282     lukem     681:        ${INSTALL_SYMLINK} -l r \
                    682:                ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                    683:                ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
1.195     lukem     684: .endif
1.284     lukem     685: .endif
1.148     lukem     686: .if ${MKLINKLIB} != "no"
1.264     jwise     687:        ${INSTALL_SYMLINK} \
1.284     lukem     688:                ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282     lukem     689:                ${_LIB_SO_TGT}
1.195     lukem     690: .if ${_LIBSODIR} != ${LIBDIR}
1.282     lukem     691:        ${INSTALL_SYMLINK} -l r \
                    692:                ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                    693:                ${_LIB_SO_TGTLIBDIR}
1.195     lukem     694: .endif
1.83      cgd       695: .endif
1.12      cgd       696: .endif
1.139     tv        697: .endif
1.89      christos  698:
1.279     lukem     699: .if ${MKLINT} != "no" && !empty(LOBJS)
1.89      christos  700: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.168     mycroft   701: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.197     mycroft   702:
1.269     dbj       703: .if ${MKUPDATE} == "no"
1.197     mycroft   704: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
                    705: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
1.89      christos  706: .endif
1.197     mycroft   707: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! llib-l${LIB}.ln
                    708: .else
1.157     fredb     709: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
1.89      christos  710: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
                    711: .endif
1.95      mycroft   712: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.197     mycroft   713: .endif
1.238     lukem     714:        ${_MKTARGET_INSTALL}
1.188     tv        715:        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264     jwise     716:                ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
1.58      cgd       717: .endif
1.252     lukem     718: .endif # !target(libinstall)                                           # }
1.1       cgd       719:
1.188     tv        720: ##### Pull in related .mk logic
1.1       cgd       721: .include <bsd.man.mk>
1.57      jtc       722: .include <bsd.nls.mk>
1.91      christos  723: .include <bsd.files.mk>
1.89      christos  724: .include <bsd.inc.mk>
1.109     cjs       725: .include <bsd.links.mk>
1.24      mycroft   726: .include <bsd.dep.mk>
1.117     mycroft   727:
1.188     tv        728: ${TARGETS}:    # ensure existence

CVSweb <webmaster@jp.NetBSD.org>