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