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

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

CVSweb <webmaster@jp.NetBSD.org>