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

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

CVSweb <webmaster@jp.NetBSD.org>