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