[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

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

CVSweb <webmaster@jp.NetBSD.org>