Annotation of src/share/mk/bsd.lib.mk, Revision 1.155.2.1
1.155.2.1! mcr 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.155.2.1! mcr 255: .if ${MORTALINSTALL} != "no"
! 256: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} \
! 257: -m 600 ${.ALLSRC} ${.TARGET}
! 258: .else
1.147 christos 259: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
260: -m 600 ${.ALLSRC} ${.TARGET}
1.155.2.1! mcr 261: .endif
1.89 christos 262: ${RANLIB} -t ${.TARGET}
263: chmod ${LIBMODE} ${.TARGET}
264:
1.104 mycroft 265: DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
1.128 tv 266: CLEANFILES+= ${DPSRCS}
1.129 tv 267: .if defined(YHEADER)
268: CLEANFILES+= ${SRCS:M*.y:.y=.h}
269: .endif
1.103 mycroft 270:
271: OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
1.89 christos 272: lib${LIB}.a:: ${OBJS} __archivebuild
1.1 cgd 273: @echo building standard ${LIB} library
274:
1.103 mycroft 275: POBJS+= ${OBJS:.o=.po}
1.89 christos 276: lib${LIB}_p.a:: ${POBJS} __archivebuild
1.1 cgd 277: @echo building profiled ${LIB} library
278:
1.103 mycroft 279: SOBJS+= ${OBJS:.o=.so}
1.89 christos 280: lib${LIB}_pic.a:: ${SOBJS} __archivebuild
1.27 pk 281: @echo building shared object ${LIB} library
282:
1.88 cgd 283: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD} \
284: ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.38 cgd 285: @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
1.37 cgd 286: @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
1.152 fair 287: .if defined(DESTDIR)
1.155 wrstuden 288: $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
1.152 fair 289: ${SHLIB_LDSTARTFILE} \
290: --whole-archive lib${LIB}_pic.a \
1.155 wrstuden 291: -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
1.152 fair 292: --no-whole-archive ${LDADD} \
293: ${SHLIB_LDENDFILE}
294: .else
1.126 jonathan 295: $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
1.123 jonathan 296: ${SHLIB_LDSTARTFILE} \
1.126 jonathan 297: --whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \
1.115 cjs 298: ${SHLIB_LDENDFILE}
1.152 fair 299: .endif
1.148 lukem 300: .if ${OBJECT_FMT} == "ELF"
1.135 tv 301: rm -f lib${LIB}.so.${SHLIB_MAJOR}
1.133 tv 302: ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
1.135 tv 303: lib${LIB}.so.${SHLIB_MAJOR}
304: rm -f lib${LIB}.so
1.133 tv 305: ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
1.135 tv 306: lib${LIB}.so
1.133 tv 307: .endif
1.35 pk 308:
1.103 mycroft 309: LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
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
340: .if !defined(BUILD)
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.89 christos 353: .if !defined(BUILD)
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
366: .if !defined(BUILD)
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
379: .if !defined(BUILD)
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.155.2.1! mcr 385: .if ${MORTALINSTALL} != "no"
! 386: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} \
! 387: -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
! 388: .else
1.147 christos 389: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
390: -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
1.155.2.1! mcr 391: .endif
1.148 lukem 392: .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
1.146 thorpej 393: /sbin/ldconfig -m ${LIBDIR}
394: .endif
1.148 lukem 395: .if ${OBJECT_FMT} == "ELF"
1.83 cgd 396: rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
397: ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
398: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
399: rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so
1.148 lukem 400: .if ${MKLINKLIB} != "no"
1.83 cgd 401: ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
402: ${DESTDIR}${LIBDIR}/lib${LIB}.so
403: .endif
1.12 cgd 404: .endif
1.139 tv 405: .endif
1.89 christos 406:
1.148 lukem 407: .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
1.89 christos 408: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
409: .if !defined(UPDATE)
410: .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
411: .endif
412: .if !defined(BUILD)
413: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
414: .endif
415:
1.95 mycroft 416: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
417: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.155.2.1! mcr 418: .if ${MORTALINSTALL} != "no"
! 419: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} \
! 420: -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
! 421: .else
1.147 christos 422: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
1.155.2.1! mcr 423: -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
! 424: .endif
1.58 cgd 425: .endif
1.1 cgd 426: .endif
427:
428: .include <bsd.man.mk>
1.57 jtc 429: .include <bsd.nls.mk>
1.91 christos 430: .include <bsd.files.mk>
1.89 christos 431: .include <bsd.inc.mk>
1.109 cjs 432: .include <bsd.links.mk>
1.24 mycroft 433: .include <bsd.dep.mk>
1.66 christos 434: .include <bsd.sys.mk>
1.117 mycroft 435:
436: # Make sure all of the standard targets are defined, even if they do nothing.
437: lint regress:
CVSweb <webmaster@jp.NetBSD.org>