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