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

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

CVSweb <webmaster@jp.NetBSD.org>