[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.293

1.293   ! pooka       1: #      $NetBSD: bsd.lib.mk,v 1.292 2008/12/08 13:10:21 pooka 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.293   ! pooka     439: # If you change this, please consider reflecting the change in
        !           440: # the override in sys/rump/Makefile.rump.
1.243     rtr       441: .if !target(__archivebuild)
1.90      christos  442: __archivebuild: .USE
1.238     lukem     443:        ${_MKTARGET_BUILD}
1.236     lukem     444:        rm -f ${.TARGET}
1.228     lukem     445:        ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.89      christos  446:        ${RANLIB} ${.TARGET}
1.243     rtr       447: .endif
1.89      christos  448:
1.243     rtr       449: .if !target(__archiveinstall)
1.89      christos  450: __archiveinstall: .USE
1.238     lukem     451:        ${_MKTARGET_INSTALL}
1.198     lukem     452:        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.269     dbj       453:            ${empty(PRESERVE):?-a "${RANLIB} -t":} ${.ALLSRC} ${.TARGET}
1.243     rtr       454: .endif
1.89      christos  455:
1.197     mycroft   456: __archivesymlinkpic: .USE
1.238     lukem     457:        ${_MKTARGET_INSTALL}
1.264     jwise     458:        ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
1.197     mycroft   459:
1.253     christos  460: DPSRCS+=       ${_YLSRCS}
                    461: CLEANFILES+=   ${_YLSRCS}
1.230     lukem     462:
1.266     christos  463: ${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
1.103     mycroft   464:
1.255     thorpej   465: lib${LIB}.a:: ${STOBJS} __archivebuild
1.1       cgd       466:
1.89      christos  467: lib${LIB}_p.a:: ${POBJS} __archivebuild
1.1       cgd       468:
1.89      christos  469: lib${LIB}_pic.a:: ${SOBJS} __archivebuild
1.27      pk        470:
1.266     christos  471: lib${LIB}_g.a:: ${GOBJS} __archivebuild
                    472:
1.235     lukem     473:
                    474: _LIBLDOPTS=
                    475: .if ${SHLIBDIR} != "/usr/lib"
                    476: _LIBLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBDIR}:${DESTDIR}/usr/lib \
                    477:                -R${SHLIBDIR} \
                    478:                -L${DESTDIR}${SHLIBDIR}
                    479: .elif ${SHLIBINSTALLDIR} != "/usr/lib"
                    480: _LIBLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
                    481:                -L${DESTDIR}${SHLIBINSTALLDIR}
                    482: .endif
                    483:
1.277     christos  484: # gcc -shared now adds -lc automatically. For libraries other than libc and
                    485: # libgcc* we add as a dependency the installed shared libc. For libc and
                    486: # libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that
                    487: # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not
                    488: # to add standard libraries, not the linker.
1.276     christos  489: .if !defined(LIB)
1.274     christos  490: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.276     christos  491: .else
1.278     simonb    492: .if ${LIB} != "c" && ${LIB:Mgcc*} == ""
1.276     christos  493: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.277     christos  494: .else
1.278     simonb    495: LDLIBC ?= -nodefaultlibs
                    496: .if ${LIB} == "c"
                    497: LDADD+= -lgcc_pic
                    498: .endif
1.276     christos  499: .endif
1.274     christos  500: .endif
                    501:
1.291     mrg       502: .if ${LIBISCXX} != "no"
                    503: LIBCC:=        ${CXX}
                    504: .else
                    505: LIBCC:=        ${CC}
                    506: .endif
                    507:
1.274     christos  508: lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
1.88      cgd       509:     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.238     lukem     510:        ${_MKTARGET_BUILD}
1.236     lukem     511:        rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
1.152     fair      512: .if defined(DESTDIR)
1.291     mrg       513:        ${LIBCC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
1.235     lukem     514:            ${_LIBLDOPTS} \
1.231     lukem     515:            -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
1.221     drochner  516:            -Wl,--whole-archive ${SOLIB} \
                    517:            -Wl,--no-whole-archive ${LDADD} \
1.277     christos  518:            -L${_GCC_LIBGCCDIR}
1.221     drochner  519: .else
1.291     mrg       520:        ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \
1.277     christos  521:            -o ${.TARGET} ${_LIBLDOPTS} \
                    522:            -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}
1.152     fair      523: .endif
1.148     lukem     524: .if ${OBJECT_FMT} == "ELF"
1.196     lukem     525: #  We don't use INSTALL_SYMLINK here because this is just
                    526: #  happening inside the build directory/objdir. XXX Why does
                    527: #  this spend so much effort on libraries that aren't live??? XXX
1.284     lukem     528: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
                    529:     "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.241     matt      530:        ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
1.177     mycroft   531:        mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
1.283     lukem     532: .endif
1.241     matt      533:        ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
1.177     mycroft   534:        mv -f lib${LIB}.so.tmp lib${LIB}.so
1.133     tv        535: .endif
1.286     joerg     536: .if ${MKSTRIPIDENT} != "no"
                    537:        ${OBJCOPY} -R .ident ${.TARGET}
                    538: .endif
1.35      pk        539:
1.252     lukem     540: .if !empty(LOBJS)                                                      # {
1.103     mycroft   541: LLIBS?=                -lc
1.58      cgd       542: llib-l${LIB}.ln: ${LOBJS}
1.238     lukem     543:        ${_MKTARGET_COMPILE}
1.236     lukem     544:        rm -f llib-l${LIB}.ln
1.206     thorpej   545: .if defined(DESTDIR)
1.228     lukem     546:        ${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
1.206     thorpej   547: .else
1.228     lukem     548:        ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
1.206     thorpej   549: .endif
1.252     lukem     550: .endif                                                                 # }
1.1       cgd       551:
1.280     lukem     552: lint: ${LOBJS}
                    553: .if defined(LOBJS) && !empty(LOBJS)
                    554:        ${LINT} ${LINTFLAGS} ${LOBJS}
                    555: .endif
                    556:
1.246     lukem     557: cleanlib: .PHONY
1.48      mycroft   558:        rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
1.255     thorpej   559:        rm -f lib${LIB}.a ${STOBJS}
1.59      cgd       560:        rm -f lib${LIB}_p.a ${POBJS}
1.266     christos  561:        rm -f lib${LIB}_g.a ${GOBJS}
1.133     tv        562:        rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
1.266     christos  563:        rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}
1.59      cgd       564:        rm -f llib-l${LIB}.ln ${LOBJS}
1.1       cgd       565:
1.252     lukem     566:
                    567: .if !target(libinstall)                                                        # {
1.148     lukem     568: # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
1.139     tv        569: libinstall::
                    570:
1.234     lukem     571: .if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no"
1.89      christos  572: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.168     mycroft   573: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.197     mycroft   574:
1.269     dbj       575: .if ${MKUPDATE} == "no"
1.197     mycroft   576: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
                    577: ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
1.89      christos  578: .endif
1.197     mycroft   579: ${DESTDIR}${LIBDIR}/lib${LIB}.a! lib${LIB}.a __archiveinstall
                    580: .else
1.157     fredb     581: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
1.89      christos  582: ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
                    583: .endif
                    584: ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
1.130     tv        585: .endif
1.197     mycroft   586: .endif
1.89      christos  587:
1.149     lukem     588: .if ${MKPROFILE} != "no"
1.89      christos  589: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.168     mycroft   590: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.197     mycroft   591:
1.269     dbj       592: .if ${MKUPDATE} == "no"
1.197     mycroft   593: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
                    594: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
1.32      pk        595: .endif
1.197     mycroft   596: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! lib${LIB}_p.a __archiveinstall
                    597: .else
1.157     fredb     598: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
1.89      christos  599: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
                    600: .endif
                    601: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
                    602: .endif
1.197     mycroft   603: .endif
1.89      christos  604:
1.268     lukem     605: .if ${MKDEBUGLIB} != "no"
1.266     christos  606: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
                    607: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
                    608:
1.269     dbj       609: .if ${MKUPDATE} == "no"
1.266     christos  610: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
                    611: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! .MADE
                    612: .endif
                    613: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! lib${LIB}_g.a __archiveinstall
                    614: .else
                    615: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
                    616: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: .MADE
                    617: .endif
                    618: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: lib${LIB}_g.a __archiveinstall
                    619: .endif
                    620: .endif
                    621:
1.149     lukem     622: .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
1.168     mycroft   623: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.160     simonb    624: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.197     mycroft   625:
1.269     dbj       626: .if ${MKUPDATE} == "no"
1.197     mycroft   627: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
                    628: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
1.89      christos  629: .endif
1.197     mycroft   630: .if ${MKPICLIB} == "no"
                    631: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}.a __archivesymlinkpic
                    632: .else
                    633: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}_pic.a __archiveinstall
                    634: .endif
                    635: .else
1.157     fredb     636: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
1.89      christos  637: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
1.33      pk        638: .endif
1.160     simonb    639: .if ${MKPICLIB} == "no"
1.197     mycroft   640: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}.a __archivesymlinkpic
1.160     simonb    641: .else
1.89      christos  642: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
1.160     simonb    643: .endif
1.89      christos  644: .endif
1.197     mycroft   645: .endif
1.89      christos  646:
1.171     christos  647: .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
1.282     lukem     648: _LIB_SO_TGT=           ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
                    649: _LIB_SO_TGTLIBDIR=        ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
                    650:
                    651: libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
                    652: .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
1.197     mycroft   653:
1.269     dbj       654: .if ${MKUPDATE} == "no"
1.197     mycroft   655: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282     lukem     656: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
1.89      christos  657: .endif
1.282     lukem     658: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
1.197     mycroft   659: .else
1.171     christos  660: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282     lukem     661: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
1.89      christos  662: .endif
1.282     lukem     663: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
1.197     mycroft   664: .endif
1.238     lukem     665:        ${_MKTARGET_INSTALL}
1.188     tv        666:        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264     jwise     667:                ${.ALLSRC} ${.TARGET}
1.195     lukem     668: .if ${_LIBSODIR} != ${LIBDIR}
1.282     lukem     669:        ${INSTALL_SYMLINK} -l r \
                    670:                ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                    671:                ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
1.195     lukem     672: .endif
1.148     lukem     673: .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
1.195     lukem     674:        /sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
1.146     thorpej   675: .endif
1.148     lukem     676: .if ${OBJECT_FMT} == "ELF"
1.284     lukem     677: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
                    678:     "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.264     jwise     679:        ${INSTALL_SYMLINK} \
1.284     lukem     680:                ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282     lukem     681:                ${_LIB_SO_TGT}.${SHLIB_MAJOR}
1.195     lukem     682: .if ${_LIBSODIR} != ${LIBDIR}
1.282     lukem     683:        ${INSTALL_SYMLINK} -l r \
                    684:                ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                    685:                ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
1.195     lukem     686: .endif
1.284     lukem     687: .endif
1.148     lukem     688: .if ${MKLINKLIB} != "no"
1.264     jwise     689:        ${INSTALL_SYMLINK} \
1.284     lukem     690:                ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282     lukem     691:                ${_LIB_SO_TGT}
1.195     lukem     692: .if ${_LIBSODIR} != ${LIBDIR}
1.282     lukem     693:        ${INSTALL_SYMLINK} -l r \
                    694:                ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
                    695:                ${_LIB_SO_TGTLIBDIR}
1.195     lukem     696: .endif
1.83      cgd       697: .endif
1.12      cgd       698: .endif
1.139     tv        699: .endif
1.89      christos  700:
1.279     lukem     701: .if ${MKLINT} != "no" && !empty(LOBJS)
1.89      christos  702: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.168     mycroft   703: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.197     mycroft   704:
1.269     dbj       705: .if ${MKUPDATE} == "no"
1.197     mycroft   706: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
                    707: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
1.89      christos  708: .endif
1.197     mycroft   709: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! llib-l${LIB}.ln
                    710: .else
1.157     fredb     711: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
1.89      christos  712: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
                    713: .endif
1.95      mycroft   714: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.197     mycroft   715: .endif
1.238     lukem     716:        ${_MKTARGET_INSTALL}
1.188     tv        717:        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264     jwise     718:                ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
1.58      cgd       719: .endif
1.252     lukem     720: .endif # !target(libinstall)                                           # }
1.1       cgd       721:
1.188     tv        722: ##### Pull in related .mk logic
1.1       cgd       723: .include <bsd.man.mk>
1.57      jtc       724: .include <bsd.nls.mk>
1.91      christos  725: .include <bsd.files.mk>
1.89      christos  726: .include <bsd.inc.mk>
1.109     cjs       727: .include <bsd.links.mk>
1.24      mycroft   728: .include <bsd.dep.mk>
1.117     mycroft   729:
1.188     tv        730: ${TARGETS}:    # ensure existence

CVSweb <webmaster@jp.NetBSD.org>