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

1.169.2.3  gmcgarry    1: #      $NetBSD$
1.92      mikel       2: #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
1.1       cgd         3:
1.117     mycroft     4: .if !target(__initialized__)
                      5: __initialized__:
1.1       cgd         6: .if exists(${.CURDIR}/../Makefile.inc)
                      7: .include "${.CURDIR}/../Makefile.inc"
                      8: .endif
1.97      mycroft     9: .include <bsd.own.mk>
1.117     mycroft    10: .include <bsd.obj.mk>
1.159     perry      11: .include <bsd.depall.mk>
1.117     mycroft    12: .MAIN:         all
                     13: .endif
1.97      mycroft    14:
1.143     erh        15: .PHONY:                checkver cleanlib libinstall
                     16: realinstall:   checkver libinstall
1.137     lukem      17: clean cleandir distclean: cleanlib
1.1       cgd        18:
1.154     simonb     19: .if exists(${SHLIB_VERSION_FILE})
                     20: SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
                     21: SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
1.169.2.4! kleink     22: SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
        !            23: .if !empty(SHLIB_TEENY)
        !            24: SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
        !            25: .else
        !            26: SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
        !            27: .endif
        !            28:
1.143     erh        29:
                     30: # Check for higher installed library versions.
1.145     erh        31: .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
                     32:        exists(${BSDSRCDIR}/lib/checkver)
1.143     erh        33: checkver:
1.144     erh        34:        @(cd ${.CURDIR} && \
1.169.2.3  gmcgarry   35:                sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
1.154     simonb     36:                    -d ${DESTDIR}${LIBDIR} ${LIB})
1.143     erh        37: .else
                     38: checkver:
                     39: .endif
1.169     thorpej    40: print-shlib-major:
                     41:        @echo ${SHLIB_MAJOR}
                     42:
                     43: print-shlib-minor:
                     44:        @echo ${SHLIB_MINOR}
1.169.2.4! kleink     45:
        !            46: print-shlib-teeny:
        !            47:        @echo ${SHLIB_TEENY}
1.143     erh        48: .else
                     49: checkver:
1.169     thorpej    50:
                     51: print-shlib-major:
                     52:        @false
                     53:
                     54: print-shlib-minor:
                     55:        @false
1.169.2.4! kleink     56:
        !            57: print-shlib-teeny:
        !            58:        @false
1.35      pk         59: .endif
1.1       cgd        60:
1.101     mycroft    61: # add additional suffixes not exported.
                     62: # .po is used for profiling object files.
                     63: # .so is used for PIC object files.
1.118     lukem      64: .SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
                     65: .SUFFIXES: .sh .m4 .m
1.82      mikel      66:
1.86      jonathan   67:
                     68: # Set PICFLAGS to cc flags for producing position-independent code,
                     69: # if not already set.  Includes -DPIC, if required.
                     70:
1.164     simonb     71: # Data-driven table using make variables to control how shared libraries
1.86      jonathan   72: # are built for different platforms and object formats.
1.125     jonathan   73: # OBJECT_FMT:          currently either "ELF" or "a.out", from <bsd.own.mk>
1.164     simonb     74: # SHLIB_SOVERSION:     version number to be compiled into a shared library
                     75: #                      via -soname. Usualy ${SHLIB_MAJOR} on ELF.
1.169.2.4! kleink     76: #                      NetBSD/pmax used to use ${SHLIB_MAJOR}.${SHLIB_MINOR}
        !            77: #                      [.${SHLIB_TEENY}]
1.164     simonb     78: # SHLIB_SHFLAGS:       Flags to tell ${LD} to emit shared library.
1.123     jonathan   79: #                      with ELF, also set shared-lib version for ld.so.
                     80: # SHLIB_LDSTARTFILE:   support .o file, call C++ file-level constructors
                     81: # SHLIB_LDENDFILE:     support .o file, call C++ file-level destructors
1.164     simonb     82: # CPPICFLAGS:          flags for ${CPP} to preprocess .[sS] files for ${AS}
                     83: # CPICFLAGS:           flags for ${CC} to compile .[cC] files to .so objects.
                     84: # CAPICFLAGS           flags for {$CC} to compiling .[Ss] files
1.107     jonathan   85: #                      (usually just ${CPPPICFLAGS} ${CPICFLAGS})
1.164     simonb     86: # APICFLAGS:           flags for ${AS} to assemble .[sS] to .so objects.
1.86      jonathan   87:
1.148     lukem      88: .if ${MACHINE_ARCH} == "alpha"
1.123     jonathan   89:                # Alpha-specific shared library flags
1.165     dmcmahil   90: CPICFLAGS ?= -fPIC -DPIC
1.107     jonathan   91: CPPPICFLAGS?= -DPIC
                     92: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
                     93: APICFLAGS ?=
1.151     drochner   94: .elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
1.123     jonathan   95:                # mips-specific shared library flags
1.86      jonathan   96:
1.160     simonb     97: # On mips, all libs are compiled with ABIcalls, not just sharedlibs.
                     98: MKPICLIB= no
                     99:
                    100: # so turn shlib PIC flags on for ${AS}.
                    101: AINC+=-DABICALLS
1.86      jonathan  102: AFLAGS+= -fPIC
                    103: AS+=   -KPIC
1.150     christos  104:
                    105: .elif ${MACHINE_ARCH} == "sparc" && ${OBJECT_FMT} == "ELF"
1.169.2.2  mycroft   106:
                    107: CPICFLAGS ?= -fPIC -DPIC
                    108: CPPPICFLAGS?= -DPIC
                    109: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
                    110: APICFLAGS ?= -KPIC
                    111:
                    112: .elif ${MACHINE_ARCH} == "sparc64" && ${OBJECT_FMT} == "ELF"
1.150     christos  113:
1.165     dmcmahil  114: CPICFLAGS ?= -fPIC -DPIC
1.150     christos  115: CPPPICFLAGS?= -DPIC
                    116: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
                    117: APICFLAGS ?= -KPIC
1.86      jonathan  118:
                    119: .else
                    120:
1.125     jonathan  121: # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
1.88      cgd       122: SHLIB_LDSTARTFILE=
                    123: SHLIB_LDENDFILE=
1.169.2.4! kleink    124: SHLIB_SOVERSION=${SHLIB_FULLVERSION}
1.125     jonathan  125: SHLIB_SHFLAGS=
1.165     dmcmahil  126: CPICFLAGS?= -fPIC -DPIC
1.107     jonathan  127: CPPPICFLAGS?= -DPIC
                    128: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
                    129: APICFLAGS?= -k
1.86      jonathan  130:
                    131: .endif
                    132:
1.160     simonb    133: MKPICLIB?= yes
                    134:
1.123     jonathan  135: # Platform-independent linker flags for ELF shared libraries
1.148     lukem     136: .if ${OBJECT_FMT} == "ELF"
1.123     jonathan  137: SHLIB_SOVERSION=${SHLIB_MAJOR}
1.125     jonathan  138: SHLIB_SHFLAGS=-soname lib${LIB}.so.${SHLIB_SOVERSION}
1.142     jonathan  139: SHLIB_LDSTARTFILE= ${DESTDIR}/usr/lib/crtbeginS.o
                    140: SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crtendS.o
1.123     jonathan  141: .endif
1.86      jonathan  142:
1.82      mikel     143: CFLAGS+=       ${COPTS}
1.1       cgd       144:
                    145: .c.o:
1.153     christos  146: .if defined(COPTS) && !empty(COPTS:M*-g*)
                    147:        ${COMPILE.c} ${.IMPSRC}
                    148: .else
1.80      christos  149:        @echo ${COMPILE.c:Q} ${.IMPSRC}
1.122     cgd       150:        @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  151:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    152:        @rm -f ${.TARGET}.o
1.153     christos  153: .endif
1.1       cgd       154:
                    155: .c.po:
1.153     christos  156: .if defined(COPTS) && !empty(COPTS:M*-g*)
                    157:        ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
                    158: .else
1.80      christos  159:        @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
1.68      cgd       160:        @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  161:        @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
                    162:        @rm -f ${.TARGET}.o
1.153     christos  163: .endif
1.17      mycroft   164:
1.27      pk        165: .c.so:
1.153     christos  166: .if defined(COPTS) && !empty(COPTS:M*-g*)
                    167:        ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    168: .else
1.86      jonathan  169:        @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    170:        @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  171:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    172:        @rm -f ${.TARGET}.o
1.153     christos  173: .endif
1.27      pk        174:
1.58      cgd       175: .c.ln:
1.121     thorpej   176:        ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
1.58      cgd       177:
1.18      mycroft   178: .cc.o .C.o:
1.153     christos  179: .if defined(COPTS) && !empty(COPTS:M*-g*)
                    180:        ${COMPILE.cc} ${.IMPSRC}
                    181: .else
1.80      christos  182:        @echo ${COMPILE.cc:Q} ${.IMPSRC}
1.62      christos  183:        @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
1.63      jtc       184:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
1.62      christos  185:        @rm -f ${.TARGET}.o
1.153     christos  186: .endif
1.17      mycroft   187:
1.18      mycroft   188: .cc.po .C.po:
1.153     christos  189: .if defined(COPTS) && !empty(COPTS:M*-g*)
                    190:        ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
                    191: .else
1.80      christos  192:        @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
1.68      cgd       193:        @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  194:        @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
                    195:        @rm -f ${.TARGET}.o
1.153     christos  196: .endif
1.28      cgd       197:
                    198: .cc.so .C.so:
1.153     christos  199: .if defined(COPTS) && !empty(COPTS:M*-g*)
                    200:        ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    201: .else
1.86      jonathan  202:        @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    203:        @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  204:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    205:        @rm -f ${.TARGET}.o
1.153     christos  206: .endif
1.118     lukem     207:
                    208: .m.o:
1.153     christos  209: .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
                    210:        ${COMPILE.m} ${.IMPSRC}
                    211: .else
1.118     lukem     212:        @echo ${COMPILE.m:Q} ${.IMPSRC}
1.122     cgd       213:        @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
1.118     lukem     214:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    215:        @rm -f ${.TARGET}.o
1.153     christos  216: .endif
1.118     lukem     217:
                    218: .m.po:
1.153     christos  219: .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
                    220:        ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
                    221: .else
1.118     lukem     222:        @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
                    223:        @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
                    224:        @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
                    225:        @rm -f ${.TARGET}.o
1.153     christos  226: .endif
1.118     lukem     227:
                    228: .m.so:
1.153     christos  229: .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
                    230:        ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    231: .else
1.118     lukem     232:        @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
                    233:        @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
                    234:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    235:        @rm -f ${.TARGET}.o
1.153     christos  236: .endif
1.1       cgd       237:
1.40      cgd       238: .S.o .s.o:
1.80      christos  239:        @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
1.69      jtc       240:        @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  241:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    242:        @rm -f ${.TARGET}.o
1.1       cgd       243:
1.40      cgd       244: .S.po .s.po:
1.80      christos  245:        @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
1.75      jtc       246:        @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  247:        @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
                    248:        @rm -f ${.TARGET}.o
1.1       cgd       249:
1.40      cgd       250: .S.so .s.so:
1.107     jonathan  251:        @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
                    252:        @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
1.62      christos  253:        @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
                    254:        @rm -f ${.TARGET}.o
1.27      pk        255:
1.148     lukem     256: .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
                    257:        || ${MKLINKLIB} != "no"
1.130     tv        258: _LIBS=lib${LIB}.a
                    259: .else
                    260: _LIBS=
                    261: .endif
1.58      cgd       262:
1.167     matt      263: OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
1.158     christos  264:
1.149     lukem     265: .if ${MKPROFILE} != "no"
1.130     tv        266: _LIBS+=lib${LIB}_p.a
1.167     matt      267: POBJS+=${OBJS:.o=.po}
1.1       cgd       268: .endif
                    269:
1.148     lukem     270: .if ${MKPIC} != "no"
1.160     simonb    271: .if ${MKPICLIB} == "no"
                    272: SOLIB=lib${LIB}.a
                    273: .else
                    274: SOLIB=lib${LIB}_pic.a
                    275: _LIBS+=${SOLIB}
1.167     matt      276: SOBJS+=${OBJS:.o=.so}
1.160     simonb    277: .endif
1.169.2.4! kleink    278: .if defined(SHLIB_FULLVERSION)
        !           279: _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
1.27      pk        280: .endif
1.35      pk        281: .endif
1.27      pk        282:
1.148     lukem     283: .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
1.58      cgd       284: _LIBS+=llib-l${LIB}.ln
1.158     christos  285: LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
1.27      pk        286: .endif
                    287:
1.167     matt      288: .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
                    289:        || ${MKLINKLIB} != "no"
1.158     christos  290: ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS}
1.167     matt      291: .else
                    292: ALLOBJS=${POBJS} ${SOBJS} ${LOBJS}
                    293: .endif
1.163     erh       294: .NOPATH: ${ALLOBJS} ${_LIBS}
1.158     christos  295:
1.162     mycroft   296: realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
1.1       cgd       297:
1.90      christos  298: __archivebuild: .USE
1.89      christos  299:        @rm -f ${.TARGET}
1.138     tv        300:        @${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.89      christos  301:        ${RANLIB} ${.TARGET}
                    302:
                    303: __archiveinstall: .USE
1.156     simonb    304:        ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
                    305:            -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
1.89      christos  306:        ${RANLIB} -t ${.TARGET}
                    307:        chmod ${LIBMODE} ${.TARGET}
                    308:
1.104     mycroft   309: DPSRCS+=       ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
1.128     tv        310: CLEANFILES+=   ${DPSRCS}
1.129     tv        311: .if defined(YHEADER)
                    312: CLEANFILES+=   ${SRCS:M*.y:.y=.h}
                    313: .endif
1.103     mycroft   314:
1.89      christos  315: lib${LIB}.a:: ${OBJS} __archivebuild
1.1       cgd       316:        @echo building standard ${LIB} library
                    317:
1.89      christos  318: lib${LIB}_p.a:: ${POBJS} __archivebuild
1.1       cgd       319:        @echo building profiled ${LIB} library
                    320:
1.89      christos  321: lib${LIB}_pic.a:: ${SOBJS} __archivebuild
1.27      pk        322:        @echo building shared object ${LIB} library
                    323:
1.169.2.4! kleink    324: lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
1.88      cgd       325:     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.169.2.4! kleink    326:        @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
        !           327:        @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
1.152     fair      328: .if defined(DESTDIR)
1.155     wrstuden  329:        $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
1.152     fair      330:            ${SHLIB_LDSTARTFILE} \
1.160     simonb    331:            --whole-archive ${SOLIB} \
1.152     fair      332:            --no-whole-archive ${LDADD} \
1.169.2.1  thorpej   333:            -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
1.152     fair      334:            ${SHLIB_LDENDFILE}
                    335: .else
1.126     jonathan  336:        $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
1.123     jonathan  337:            ${SHLIB_LDSTARTFILE} \
1.160     simonb    338:            --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \
1.115     cjs       339:            ${SHLIB_LDENDFILE}
1.152     fair      340: .endif
1.148     lukem     341: .if ${OBJECT_FMT} == "ELF"
1.135     tv        342:        rm -f lib${LIB}.so.${SHLIB_MAJOR}
1.169.2.4! kleink    343:        ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}
1.135     tv        344:        rm -f lib${LIB}.so
1.169.2.4! kleink    345:        ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so
1.133     tv        346: .endif
1.35      pk        347:
1.103     mycroft   348: LLIBS?=                -lc
1.58      cgd       349: llib-l${LIB}.ln: ${LOBJS}
                    350:        @echo building llib-l${LIB}.ln
                    351:        @rm -f llib-l${LIB}.ln
1.141     wrstuden  352:        @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
1.1       cgd       353:
1.81      cgd       354: cleanlib:
1.48      mycroft   355:        rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
1.59      cgd       356:        rm -f lib${LIB}.a ${OBJS}
                    357:        rm -f lib${LIB}_p.a ${POBJS}
1.133     tv        358:        rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
1.59      cgd       359:        rm -f llib-l${LIB}.ln ${LOBJS}
1.1       cgd       360:
1.26      mycroft   361: .if defined(SRCS)
1.64      christos  362: afterdepend: .depend
1.1       cgd       363:        @(TMP=/tmp/_depend$$$$; \
1.79      cgd       364:            sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
1.58      cgd       365:              < .depend > $$TMP; \
1.1       cgd       366:            mv $$TMP .depend)
1.26      mycroft   367: .endif
1.1       cgd       368:
1.97      mycroft   369: .if !target(libinstall)
1.148     lukem     370: # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
1.139     tv        371: libinstall::
                    372:
1.148     lukem     373: .if ${MKLINKLIB} != "no"
1.89      christos  374: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.168     mycroft   375: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.89      christos  376: .if !defined(UPDATE)
                    377: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
                    378: .endif
1.168     mycroft   379:
1.157     fredb     380: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
1.89      christos  381: ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
                    382: .endif
                    383: ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
1.130     tv        384: .endif
1.89      christos  385:
1.149     lukem     386: .if ${MKPROFILE} != "no"
1.89      christos  387: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.168     mycroft   388: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.89      christos  389: .if !defined(UPDATE)
                    390: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.32      pk        391: .endif
1.168     mycroft   392:
1.157     fredb     393: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
1.89      christos  394: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
                    395: .endif
                    396: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
                    397: .endif
                    398:
1.149     lukem     399: .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
1.168     mycroft   400: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.160     simonb    401: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.89      christos  402: .if !defined(UPDATE)
                    403: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
                    404: .endif
1.168     mycroft   405:
1.157     fredb     406: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
1.89      christos  407: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
1.33      pk        408: .endif
1.160     simonb    409: .if ${MKPICLIB} == "no"
                    410: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
                    411:        rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
                    412:        ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
                    413: .else
1.89      christos  414: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
1.160     simonb    415: .endif
1.89      christos  416: .endif
                    417:
1.169.2.4! kleink    418: .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
        !           419: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
        !           420: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
1.89      christos  421: .if !defined(UPDATE)
1.169.2.4! kleink    422: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
1.89      christos  423: .endif
1.168     mycroft   424:
1.169.2.4! kleink    425: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
        !           426: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
1.89      christos  427: .endif
1.169.2.4! kleink    428: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
1.156     simonb    429:        ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
                    430:            -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
1.148     lukem     431: .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
1.146     thorpej   432:        /sbin/ldconfig -m ${LIBDIR}
                    433: .endif
1.148     lukem     434: .if ${OBJECT_FMT} == "ELF"
1.83      cgd       435:        rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
1.169.2.4! kleink    436:        ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
1.83      cgd       437:            ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
                    438:        rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so
1.148     lukem     439: .if ${MKLINKLIB} != "no"
1.169.2.4! kleink    440:        ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
1.83      cgd       441:            ${DESTDIR}${LIBDIR}/lib${LIB}.so
                    442: .endif
1.12      cgd       443: .endif
1.139     tv        444: .endif
1.89      christos  445:
1.148     lukem     446: .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
1.89      christos  447: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.168     mycroft   448: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.89      christos  449: .if !defined(UPDATE)
                    450: .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
                    451: .endif
1.168     mycroft   452:
1.157     fredb     453: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
1.89      christos  454: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
                    455: .endif
1.95      mycroft   456: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.156     simonb    457:        ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
                    458:            -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
1.58      cgd       459: .endif
1.1       cgd       460: .endif
                    461:
                    462: .include <bsd.man.mk>
1.57      jtc       463: .include <bsd.nls.mk>
1.91      christos  464: .include <bsd.files.mk>
1.89      christos  465: .include <bsd.inc.mk>
1.109     cjs       466: .include <bsd.links.mk>
1.24      mycroft   467: .include <bsd.dep.mk>
1.66      christos  468: .include <bsd.sys.mk>
1.117     mycroft   469:
                    470: # Make sure all of the standard targets are defined, even if they do nothing.
                    471: lint regress:

CVSweb <webmaster@jp.NetBSD.org>