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

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

CVSweb <webmaster@jp.NetBSD.org>