Annotation of src/share/mk/bsd.lib.mk, Revision 1.172
1.172 ! matt 1: # $NetBSD: bsd.lib.mk,v 1.171 2000/07/03 21:08:55 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.171 christos 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.154 simonb 35: ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
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.171 christos 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.171 christos 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.171 christos 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.172 ! matt 104:
! 105: .elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
! 106: # On the VAX, all object are PIC by default, not just sharedlibs.
! 107: MKPICLIB= no
1.150 christos 108:
109: .elif ${MACHINE_ARCH} == "sparc" && ${OBJECT_FMT} == "ELF"
110:
1.165 dmcmahil 111: CPICFLAGS ?= -fPIC -DPIC
1.150 christos 112: CPPPICFLAGS?= -DPIC
113: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
114: APICFLAGS ?= -KPIC
1.86 jonathan 115:
116: .else
117:
1.125 jonathan 118: # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
1.88 cgd 119: SHLIB_LDSTARTFILE=
120: SHLIB_LDENDFILE=
1.171 christos 121: SHLIB_SOVERSION=${SHLIB_FULLVERSION}
1.125 jonathan 122: SHLIB_SHFLAGS=
1.165 dmcmahil 123: CPICFLAGS?= -fPIC -DPIC
1.107 jonathan 124: CPPPICFLAGS?= -DPIC
125: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
126: APICFLAGS?= -k
1.86 jonathan 127:
128: .endif
129:
1.160 simonb 130: MKPICLIB?= yes
131:
1.123 jonathan 132: # Platform-independent linker flags for ELF shared libraries
1.148 lukem 133: .if ${OBJECT_FMT} == "ELF"
1.123 jonathan 134: SHLIB_SOVERSION=${SHLIB_MAJOR}
1.125 jonathan 135: SHLIB_SHFLAGS=-soname lib${LIB}.so.${SHLIB_SOVERSION}
1.142 jonathan 136: SHLIB_LDSTARTFILE= ${DESTDIR}/usr/lib/crtbeginS.o
137: SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crtendS.o
1.123 jonathan 138: .endif
1.86 jonathan 139:
1.82 mikel 140: CFLAGS+= ${COPTS}
1.1 cgd 141:
142: .c.o:
1.153 christos 143: .if defined(COPTS) && !empty(COPTS:M*-g*)
144: ${COMPILE.c} ${.IMPSRC}
145: .else
1.80 christos 146: @echo ${COMPILE.c:Q} ${.IMPSRC}
1.122 cgd 147: @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 148: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
149: @rm -f ${.TARGET}.o
1.153 christos 150: .endif
1.1 cgd 151:
152: .c.po:
1.153 christos 153: .if defined(COPTS) && !empty(COPTS:M*-g*)
154: ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
155: .else
1.80 christos 156: @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
1.68 cgd 157: @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 158: @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
159: @rm -f ${.TARGET}.o
1.153 christos 160: .endif
1.17 mycroft 161:
1.27 pk 162: .c.so:
1.153 christos 163: .if defined(COPTS) && !empty(COPTS:M*-g*)
164: ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
165: .else
1.86 jonathan 166: @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
167: @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 168: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
169: @rm -f ${.TARGET}.o
1.153 christos 170: .endif
1.27 pk 171:
1.58 cgd 172: .c.ln:
1.121 thorpej 173: ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
1.58 cgd 174:
1.18 mycroft 175: .cc.o .C.o:
1.153 christos 176: .if defined(COPTS) && !empty(COPTS:M*-g*)
177: ${COMPILE.cc} ${.IMPSRC}
178: .else
1.80 christos 179: @echo ${COMPILE.cc:Q} ${.IMPSRC}
1.62 christos 180: @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
1.63 jtc 181: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
1.62 christos 182: @rm -f ${.TARGET}.o
1.153 christos 183: .endif
1.17 mycroft 184:
1.18 mycroft 185: .cc.po .C.po:
1.153 christos 186: .if defined(COPTS) && !empty(COPTS:M*-g*)
187: ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
188: .else
1.80 christos 189: @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
1.68 cgd 190: @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 191: @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
192: @rm -f ${.TARGET}.o
1.153 christos 193: .endif
1.28 cgd 194:
195: .cc.so .C.so:
1.153 christos 196: .if defined(COPTS) && !empty(COPTS:M*-g*)
197: ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
198: .else
1.86 jonathan 199: @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
200: @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 201: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
202: @rm -f ${.TARGET}.o
1.153 christos 203: .endif
1.118 lukem 204:
205: .m.o:
1.153 christos 206: .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
207: ${COMPILE.m} ${.IMPSRC}
208: .else
1.118 lukem 209: @echo ${COMPILE.m:Q} ${.IMPSRC}
1.122 cgd 210: @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
1.118 lukem 211: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
212: @rm -f ${.TARGET}.o
1.153 christos 213: .endif
1.118 lukem 214:
215: .m.po:
1.153 christos 216: .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
217: ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
218: .else
1.118 lukem 219: @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
220: @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
221: @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
222: @rm -f ${.TARGET}.o
1.153 christos 223: .endif
1.118 lukem 224:
225: .m.so:
1.153 christos 226: .if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
227: ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
228: .else
1.118 lukem 229: @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
230: @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
231: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
232: @rm -f ${.TARGET}.o
1.153 christos 233: .endif
1.1 cgd 234:
1.40 cgd 235: .S.o .s.o:
1.80 christos 236: @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
1.69 jtc 237: @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 238: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
239: @rm -f ${.TARGET}.o
1.1 cgd 240:
1.40 cgd 241: .S.po .s.po:
1.80 christos 242: @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
1.75 jtc 243: @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 244: @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
245: @rm -f ${.TARGET}.o
1.1 cgd 246:
1.40 cgd 247: .S.so .s.so:
1.107 jonathan 248: @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
249: @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
1.62 christos 250: @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
251: @rm -f ${.TARGET}.o
1.27 pk 252:
1.148 lukem 253: .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
254: || ${MKLINKLIB} != "no"
1.130 tv 255: _LIBS=lib${LIB}.a
256: .else
257: _LIBS=
258: .endif
1.58 cgd 259:
1.167 matt 260: OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
1.158 christos 261:
1.149 lukem 262: .if ${MKPROFILE} != "no"
1.130 tv 263: _LIBS+=lib${LIB}_p.a
1.167 matt 264: POBJS+=${OBJS:.o=.po}
1.1 cgd 265: .endif
266:
1.148 lukem 267: .if ${MKPIC} != "no"
1.160 simonb 268: .if ${MKPICLIB} == "no"
269: SOLIB=lib${LIB}.a
270: .else
271: SOLIB=lib${LIB}_pic.a
272: _LIBS+=${SOLIB}
1.167 matt 273: SOBJS+=${OBJS:.o=.so}
1.160 simonb 274: .endif
1.171 christos 275: .if defined(SHLIB_FULLVERSION)
276: _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
1.27 pk 277: .endif
1.35 pk 278: .endif
1.27 pk 279:
1.148 lukem 280: .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
1.58 cgd 281: _LIBS+=llib-l${LIB}.ln
1.158 christos 282: LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
1.27 pk 283: .endif
284:
1.167 matt 285: .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
286: || ${MKLINKLIB} != "no"
1.158 christos 287: ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS}
1.167 matt 288: .else
289: ALLOBJS=${POBJS} ${SOBJS} ${LOBJS}
290: .endif
1.163 erh 291: .NOPATH: ${ALLOBJS} ${_LIBS}
1.158 christos 292:
1.162 mycroft 293: realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
1.1 cgd 294:
1.90 christos 295: __archivebuild: .USE
1.89 christos 296: @rm -f ${.TARGET}
1.138 tv 297: @${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.89 christos 298: ${RANLIB} ${.TARGET}
299:
300: __archiveinstall: .USE
1.156 simonb 301: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
302: -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
1.89 christos 303: ${RANLIB} -t ${.TARGET}
304: chmod ${LIBMODE} ${.TARGET}
305:
1.104 mycroft 306: DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
1.128 tv 307: CLEANFILES+= ${DPSRCS}
1.129 tv 308: .if defined(YHEADER)
309: CLEANFILES+= ${SRCS:M*.y:.y=.h}
310: .endif
1.103 mycroft 311:
1.89 christos 312: lib${LIB}.a:: ${OBJS} __archivebuild
1.1 cgd 313: @echo building standard ${LIB} library
314:
1.89 christos 315: lib${LIB}_p.a:: ${POBJS} __archivebuild
1.1 cgd 316: @echo building profiled ${LIB} library
317:
1.89 christos 318: lib${LIB}_pic.a:: ${SOBJS} __archivebuild
1.27 pk 319: @echo building shared object ${LIB} library
320:
1.171 christos 321: lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
1.88 cgd 322: ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.171 christos 323: @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
324: @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
1.152 fair 325: .if defined(DESTDIR)
1.155 wrstuden 326: $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
1.152 fair 327: ${SHLIB_LDSTARTFILE} \
1.160 simonb 328: --whole-archive ${SOLIB} \
1.170 erh 329: --no-whole-archive ${LDADD} \
1.155 wrstuden 330: -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
1.152 fair 331: ${SHLIB_LDENDFILE}
332: .else
1.126 jonathan 333: $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
1.123 jonathan 334: ${SHLIB_LDSTARTFILE} \
1.160 simonb 335: --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \
1.115 cjs 336: ${SHLIB_LDENDFILE}
1.152 fair 337: .endif
1.148 lukem 338: .if ${OBJECT_FMT} == "ELF"
1.135 tv 339: rm -f lib${LIB}.so.${SHLIB_MAJOR}
1.171 christos 340: ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}
1.135 tv 341: rm -f lib${LIB}.so
1.171 christos 342: ln -s lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so
1.133 tv 343: .endif
1.35 pk 344:
1.103 mycroft 345: LLIBS?= -lc
1.58 cgd 346: llib-l${LIB}.ln: ${LOBJS}
347: @echo building llib-l${LIB}.ln
348: @rm -f llib-l${LIB}.ln
1.141 wrstuden 349: @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
1.1 cgd 350:
1.81 cgd 351: cleanlib:
1.48 mycroft 352: rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
1.59 cgd 353: rm -f lib${LIB}.a ${OBJS}
354: rm -f lib${LIB}_p.a ${POBJS}
1.133 tv 355: rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
1.59 cgd 356: rm -f llib-l${LIB}.ln ${LOBJS}
1.1 cgd 357:
1.26 mycroft 358: .if defined(SRCS)
1.64 christos 359: afterdepend: .depend
1.1 cgd 360: @(TMP=/tmp/_depend$$$$; \
1.79 cgd 361: sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
1.58 cgd 362: < .depend > $$TMP; \
1.1 cgd 363: mv $$TMP .depend)
1.26 mycroft 364: .endif
1.1 cgd 365:
1.97 mycroft 366: .if !target(libinstall)
1.148 lukem 367: # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
1.139 tv 368: libinstall::
369:
1.148 lukem 370: .if ${MKLINKLIB} != "no"
1.89 christos 371: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.168 mycroft 372: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.89 christos 373: .if !defined(UPDATE)
374: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
375: .endif
1.168 mycroft 376:
1.157 fredb 377: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
1.89 christos 378: ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
379: .endif
380: ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
1.130 tv 381: .endif
1.89 christos 382:
1.149 lukem 383: .if ${MKPROFILE} != "no"
1.89 christos 384: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.168 mycroft 385: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.89 christos 386: .if !defined(UPDATE)
387: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.32 pk 388: .endif
1.168 mycroft 389:
1.157 fredb 390: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
1.89 christos 391: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
392: .endif
393: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
394: .endif
395:
1.149 lukem 396: .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
1.168 mycroft 397: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.160 simonb 398: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.89 christos 399: .if !defined(UPDATE)
400: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
401: .endif
1.168 mycroft 402:
1.157 fredb 403: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
1.89 christos 404: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
1.33 pk 405: .endif
1.160 simonb 406: .if ${MKPICLIB} == "no"
407: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
408: rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
409: ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
410: .else
1.89 christos 411: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
1.160 simonb 412: .endif
1.89 christos 413: .endif
414:
1.171 christos 415: .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
416: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
417: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
1.89 christos 418: .if !defined(UPDATE)
1.171 christos 419: .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
1.89 christos 420: .endif
1.168 mycroft 421:
1.171 christos 422: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
423: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
1.89 christos 424: .endif
1.171 christos 425: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
1.156 simonb 426: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
427: -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
1.148 lukem 428: .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
1.146 thorpej 429: /sbin/ldconfig -m ${LIBDIR}
430: .endif
1.148 lukem 431: .if ${OBJECT_FMT} == "ELF"
1.83 cgd 432: rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
1.171 christos 433: ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
1.83 cgd 434: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
435: rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so
1.148 lukem 436: .if ${MKLINKLIB} != "no"
1.171 christos 437: ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
1.83 cgd 438: ${DESTDIR}${LIBDIR}/lib${LIB}.so
439: .endif
1.12 cgd 440: .endif
1.139 tv 441: .endif
1.89 christos 442:
1.148 lukem 443: .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
1.89 christos 444: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.168 mycroft 445: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.89 christos 446: .if !defined(UPDATE)
447: .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
448: .endif
1.168 mycroft 449:
1.157 fredb 450: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
1.89 christos 451: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
452: .endif
1.95 mycroft 453: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.156 simonb 454: ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
455: -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
1.58 cgd 456: .endif
1.1 cgd 457: .endif
458:
459: .include <bsd.man.mk>
1.57 jtc 460: .include <bsd.nls.mk>
1.91 christos 461: .include <bsd.files.mk>
1.89 christos 462: .include <bsd.inc.mk>
1.109 cjs 463: .include <bsd.links.mk>
1.24 mycroft 464: .include <bsd.dep.mk>
1.66 christos 465: .include <bsd.sys.mk>
1.117 mycroft 466:
467: # Make sure all of the standard targets are defined, even if they do nothing.
468: lint regress:
CVSweb <webmaster@jp.NetBSD.org>