bsd.lib.mk revision 1.152.2.3 1 1.152.2.3 he # $NetBSD: bsd.lib.mk,v 1.152.2.3 2000/07/06 16:54:37 he Exp $
2 1.92 mikel # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
3 1.1 cgd
4 1.117 mycroft .if !target(__initialized__)
5 1.117 mycroft __initialized__:
6 1.1 cgd .if exists(${.CURDIR}/../Makefile.inc)
7 1.1 cgd .include "${.CURDIR}/../Makefile.inc"
8 1.1 cgd .endif
9 1.97 mycroft .include <bsd.own.mk>
10 1.117 mycroft .include <bsd.obj.mk>
11 1.117 mycroft .MAIN: all
12 1.117 mycroft .endif
13 1.97 mycroft
14 1.143 erh .PHONY: checkver cleanlib libinstall
15 1.143 erh realinstall: checkver libinstall
16 1.137 lukem clean cleandir distclean: cleanlib
17 1.1 cgd
18 1.35 pk .if exists(${.CURDIR}/shlib_version)
19 1.37 cgd SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
20 1.37 cgd SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
21 1.152.2.2 he SHLIB_TEENY != . ${.CURDIR}/shlib_version ; echo $$teeny
22 1.152.2.2 he .if !empty(SHLIB_TEENY)
23 1.152.2.2 he SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
24 1.152.2.2 he .else
25 1.152.2.2 he SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
26 1.152.2.2 he .endif
27 1.143 erh
28 1.143 erh # Check for higher installed library versions.
29 1.145 erh .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
30 1.145 erh exists(${BSDSRCDIR}/lib/checkver)
31 1.143 erh checkver:
32 1.144 erh @(cd ${.CURDIR} && \
33 1.144 erh ${BSDSRCDIR}/lib/checkver -d ${DESTDIR}${LIBDIR} ${LIB})
34 1.143 erh .else
35 1.143 erh checkver:
36 1.143 erh .endif
37 1.143 erh .else
38 1.143 erh checkver:
39 1.35 pk .endif
40 1.1 cgd
41 1.101 mycroft # add additional suffixes not exported.
42 1.101 mycroft # .po is used for profiling object files.
43 1.101 mycroft # .so is used for PIC object files.
44 1.118 lukem .SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
45 1.118 lukem .SUFFIXES: .sh .m4 .m
46 1.82 mikel
47 1.86 jonathan
48 1.86 jonathan # Set PICFLAGS to cc flags for producing position-independent code,
49 1.86 jonathan # if not already set. Includes -DPIC, if required.
50 1.86 jonathan
51 1.86 jonathan # Data-driven table using make variables to control how shared libraries
52 1.86 jonathan # are built for different platforms and object formats.
53 1.125 jonathan # OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk>
54 1.86 jonathan # SHLIB_SOVERSION: version number to be compiled into a shared library
55 1.86 jonathan # via -soname. Usualy ${SHLIB_MAJOR} on ELF.
56 1.152.2.2 he # NetBSD/pmax used to use ${SHLIB_MAJOR}.${SHLIB-MINOR}.
57 1.123 jonathan # SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
58 1.123 jonathan # with ELF, also set shared-lib version for ld.so.
59 1.123 jonathan # SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
60 1.123 jonathan # SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
61 1.107 jonathan # CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
62 1.107 jonathan # CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects.
63 1.107 jonathan # CAPICFLAGS flags for {$CC} to compiling .[Ss] files
64 1.107 jonathan # (usually just ${CPPPICFLAGS} ${CPICFLAGS})
65 1.107 jonathan # APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
66 1.86 jonathan
67 1.148 lukem .if ${MACHINE_ARCH} == "alpha"
68 1.123 jonathan # Alpha-specific shared library flags
69 1.86 jonathan CPICFLAGS ?= -fpic -DPIC
70 1.107 jonathan CPPPICFLAGS?= -DPIC
71 1.107 jonathan CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
72 1.107 jonathan APICFLAGS ?=
73 1.151 drochner .elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
74 1.123 jonathan # mips-specific shared library flags
75 1.86 jonathan
76 1.86 jonathan # On mips, all libs need to be compiled with ABIcalls, not just sharedlibs.
77 1.86 jonathan CPICFLAGS?=
78 1.86 jonathan APICFLAGS?=
79 1.86 jonathan #CPICFLAGS?= -fpic -DPIC
80 1.86 jonathan #APICFLAGS?= -DPIC
81 1.86 jonathan
82 1.86 jonathan # so turn shlib PIC flags on for ${CPP}, ${CC}, and ${AS} as follows:
83 1.86 jonathan AINC+=-DPIC -DABICALLS
84 1.86 jonathan COPTS+= -fPIC ${AINC}
85 1.86 jonathan AFLAGS+= -fPIC
86 1.86 jonathan AS+= -KPIC
87 1.150 christos
88 1.150 christos .elif ${MACHINE_ARCH} == "sparc" && ${OBJECT_FMT} == "ELF"
89 1.150 christos
90 1.150 christos CPICFLAGS ?= -fpic -DPIC
91 1.150 christos CPPPICFLAGS?= -DPIC
92 1.150 christos CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
93 1.150 christos APICFLAGS ?= -KPIC
94 1.86 jonathan
95 1.86 jonathan .else
96 1.86 jonathan
97 1.125 jonathan # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
98 1.88 cgd SHLIB_LDSTARTFILE=
99 1.88 cgd SHLIB_LDENDFILE=
100 1.125 jonathan SHLIB_SHFLAGS=
101 1.152.2.2 he SHLIB_SOVERSION=${SHLIB_FULLVERSION}
102 1.116 pk CPICFLAGS?= -fpic -DPIC
103 1.107 jonathan CPPPICFLAGS?= -DPIC
104 1.107 jonathan CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
105 1.107 jonathan APICFLAGS?= -k
106 1.86 jonathan
107 1.86 jonathan .endif
108 1.86 jonathan
109 1.123 jonathan # Platform-independent linker flags for ELF shared libraries
110 1.148 lukem .if ${OBJECT_FMT} == "ELF"
111 1.123 jonathan SHLIB_SOVERSION=${SHLIB_MAJOR}
112 1.125 jonathan SHLIB_SHFLAGS=-soname lib${LIB}.so.${SHLIB_SOVERSION}
113 1.142 jonathan SHLIB_LDSTARTFILE= ${DESTDIR}/usr/lib/crtbeginS.o
114 1.142 jonathan SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crtendS.o
115 1.123 jonathan .endif
116 1.86 jonathan
117 1.82 mikel CFLAGS+= ${COPTS}
118 1.1 cgd
119 1.1 cgd .c.o:
120 1.80 christos @echo ${COMPILE.c:Q} ${.IMPSRC}
121 1.122 cgd @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
122 1.62 christos @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
123 1.62 christos @rm -f ${.TARGET}.o
124 1.1 cgd
125 1.1 cgd .c.po:
126 1.80 christos @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
127 1.68 cgd @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
128 1.62 christos @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
129 1.62 christos @rm -f ${.TARGET}.o
130 1.17 mycroft
131 1.27 pk .c.so:
132 1.86 jonathan @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
133 1.86 jonathan @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
134 1.62 christos @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
135 1.62 christos @rm -f ${.TARGET}.o
136 1.27 pk
137 1.58 cgd .c.ln:
138 1.121 thorpej ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
139 1.58 cgd
140 1.18 mycroft .cc.o .C.o:
141 1.80 christos @echo ${COMPILE.cc:Q} ${.IMPSRC}
142 1.62 christos @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
143 1.63 jtc @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
144 1.62 christos @rm -f ${.TARGET}.o
145 1.17 mycroft
146 1.18 mycroft .cc.po .C.po:
147 1.80 christos @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
148 1.68 cgd @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
149 1.62 christos @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
150 1.62 christos @rm -f ${.TARGET}.o
151 1.28 cgd
152 1.28 cgd .cc.so .C.so:
153 1.86 jonathan @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
154 1.86 jonathan @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
155 1.62 christos @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
156 1.62 christos @rm -f ${.TARGET}.o
157 1.118 lukem
158 1.118 lukem .m.o:
159 1.118 lukem @echo ${COMPILE.m:Q} ${.IMPSRC}
160 1.122 cgd @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
161 1.118 lukem @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
162 1.118 lukem @rm -f ${.TARGET}.o
163 1.118 lukem
164 1.118 lukem .m.po:
165 1.118 lukem @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
166 1.118 lukem @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
167 1.118 lukem @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
168 1.118 lukem @rm -f ${.TARGET}.o
169 1.118 lukem
170 1.118 lukem .m.so:
171 1.118 lukem @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
172 1.118 lukem @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
173 1.118 lukem @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
174 1.118 lukem @rm -f ${.TARGET}.o
175 1.1 cgd
176 1.40 cgd .S.o .s.o:
177 1.80 christos @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
178 1.69 jtc @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
179 1.62 christos @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
180 1.62 christos @rm -f ${.TARGET}.o
181 1.1 cgd
182 1.40 cgd .S.po .s.po:
183 1.80 christos @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
184 1.75 jtc @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
185 1.62 christos @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
186 1.62 christos @rm -f ${.TARGET}.o
187 1.1 cgd
188 1.40 cgd .S.so .s.so:
189 1.107 jonathan @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
190 1.107 jonathan @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
191 1.62 christos @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
192 1.62 christos @rm -f ${.TARGET}.o
193 1.27 pk
194 1.148 lukem .if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
195 1.148 lukem || ${MKLINKLIB} != "no"
196 1.130 tv _LIBS=lib${LIB}.a
197 1.130 tv .else
198 1.130 tv _LIBS=
199 1.130 tv .endif
200 1.58 cgd
201 1.149 lukem .if ${MKPROFILE} != "no"
202 1.130 tv _LIBS+=lib${LIB}_p.a
203 1.1 cgd .endif
204 1.1 cgd
205 1.148 lukem .if ${MKPIC} != "no"
206 1.27 pk _LIBS+=lib${LIB}_pic.a
207 1.37 cgd .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
208 1.152.2.2 he _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
209 1.27 pk .endif
210 1.35 pk .endif
211 1.27 pk
212 1.148 lukem .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
213 1.58 cgd _LIBS+=llib-l${LIB}.ln
214 1.27 pk .endif
215 1.27 pk
216 1.102 mycroft all: ${SRCS} ${_LIBS}
217 1.1 cgd
218 1.90 christos __archivebuild: .USE
219 1.89 christos @rm -f ${.TARGET}
220 1.138 tv @${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
221 1.89 christos ${RANLIB} ${.TARGET}
222 1.89 christos
223 1.89 christos __archiveinstall: .USE
224 1.147 christos ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
225 1.147 christos -m 600 ${.ALLSRC} ${.TARGET}
226 1.89 christos ${RANLIB} -t ${.TARGET}
227 1.89 christos chmod ${LIBMODE} ${.TARGET}
228 1.89 christos
229 1.104 mycroft DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
230 1.128 tv CLEANFILES+= ${DPSRCS}
231 1.129 tv .if defined(YHEADER)
232 1.129 tv CLEANFILES+= ${SRCS:M*.y:.y=.h}
233 1.129 tv .endif
234 1.103 mycroft
235 1.103 mycroft OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
236 1.89 christos lib${LIB}.a:: ${OBJS} __archivebuild
237 1.1 cgd @echo building standard ${LIB} library
238 1.1 cgd
239 1.103 mycroft POBJS+= ${OBJS:.o=.po}
240 1.89 christos lib${LIB}_p.a:: ${POBJS} __archivebuild
241 1.1 cgd @echo building profiled ${LIB} library
242 1.1 cgd
243 1.103 mycroft SOBJS+= ${OBJS:.o=.so}
244 1.89 christos lib${LIB}_pic.a:: ${SOBJS} __archivebuild
245 1.27 pk @echo building shared object ${LIB} library
246 1.27 pk
247 1.152.2.2 he lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}_pic.a ${DPADD} \
248 1.88 cgd ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
249 1.152.2.3 he @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
250 1.152.2.2 he @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
251 1.152 fair .if defined(DESTDIR)
252 1.152 fair $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
253 1.152 fair ${SHLIB_LDSTARTFILE} \
254 1.152 fair --whole-archive lib${LIB}_pic.a \
255 1.152 fair -nostdlib -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
256 1.152 fair --no-whole-archive ${LDADD} \
257 1.152 fair ${SHLIB_LDENDFILE}
258 1.152 fair .else
259 1.126 jonathan $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
260 1.123 jonathan ${SHLIB_LDSTARTFILE} \
261 1.126 jonathan --whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \
262 1.115 cjs ${SHLIB_LDENDFILE}
263 1.152 fair .endif
264 1.148 lukem .if ${OBJECT_FMT} == "ELF"
265 1.135 tv rm -f lib${LIB}.so.${SHLIB_MAJOR}
266 1.152.2.2 he ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
267 1.135 tv lib${LIB}.so.${SHLIB_MAJOR}
268 1.135 tv rm -f lib${LIB}.so
269 1.152.2.2 he ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
270 1.135 tv lib${LIB}.so
271 1.133 tv .endif
272 1.35 pk
273 1.103 mycroft LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
274 1.103 mycroft LLIBS?= -lc
275 1.58 cgd llib-l${LIB}.ln: ${LOBJS}
276 1.58 cgd @echo building llib-l${LIB}.ln
277 1.58 cgd @rm -f llib-l${LIB}.ln
278 1.141 wrstuden @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
279 1.1 cgd
280 1.81 cgd cleanlib:
281 1.48 mycroft rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
282 1.59 cgd rm -f lib${LIB}.a ${OBJS}
283 1.59 cgd rm -f lib${LIB}_p.a ${POBJS}
284 1.133 tv rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
285 1.59 cgd rm -f llib-l${LIB}.ln ${LOBJS}
286 1.1 cgd
287 1.26 mycroft .if defined(SRCS)
288 1.64 christos afterdepend: .depend
289 1.1 cgd @(TMP=/tmp/_depend$$$$; \
290 1.79 cgd sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
291 1.58 cgd < .depend > $$TMP; \
292 1.1 cgd mv $$TMP .depend)
293 1.26 mycroft .endif
294 1.1 cgd
295 1.97 mycroft .if !target(libinstall)
296 1.148 lukem # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
297 1.139 tv libinstall::
298 1.139 tv
299 1.148 lukem .if ${MKLINKLIB} != "no"
300 1.89 christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
301 1.89 christos .if !defined(UPDATE)
302 1.89 christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
303 1.89 christos .endif
304 1.152.2.1 he .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
305 1.89 christos ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
306 1.89 christos .endif
307 1.89 christos
308 1.95 mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
309 1.89 christos ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
310 1.130 tv .endif
311 1.89 christos
312 1.149 lukem .if ${MKPROFILE} != "no"
313 1.89 christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
314 1.89 christos .if !defined(UPDATE)
315 1.89 christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
316 1.32 pk .endif
317 1.152.2.1 he .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
318 1.89 christos ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
319 1.89 christos .endif
320 1.89 christos
321 1.95 mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
322 1.89 christos ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
323 1.89 christos .endif
324 1.89 christos
325 1.149 lukem .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
326 1.89 christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
327 1.89 christos .if !defined(UPDATE)
328 1.89 christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
329 1.89 christos .endif
330 1.152.2.1 he .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
331 1.89 christos ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
332 1.33 pk .endif
333 1.89 christos
334 1.95 mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
335 1.89 christos ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
336 1.89 christos .endif
337 1.89 christos
338 1.148 lukem .if ${MKPIC} != "no" && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
339 1.152.2.2 he libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
340 1.89 christos .if !defined(UPDATE)
341 1.152.2.2 he .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
342 1.89 christos .endif
343 1.152.2.2 he .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
344 1.152.2.2 he ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
345 1.89 christos .endif
346 1.92 mikel
347 1.152.2.2 he .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
348 1.152.2.2 he ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
349 1.147 christos ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
350 1.147 christos -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
351 1.148 lukem .if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
352 1.146 thorpej /sbin/ldconfig -m ${LIBDIR}
353 1.146 thorpej .endif
354 1.148 lukem .if ${OBJECT_FMT} == "ELF"
355 1.83 cgd rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
356 1.152.2.2 he ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
357 1.83 cgd ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
358 1.83 cgd rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so
359 1.148 lukem .if ${MKLINKLIB} != "no"
360 1.152.2.2 he ln -s lib${LIB}.so.${SHLIB_FULLVERSION} \
361 1.83 cgd ${DESTDIR}${LIBDIR}/lib${LIB}.so
362 1.83 cgd .endif
363 1.12 cgd .endif
364 1.139 tv .endif
365 1.89 christos
366 1.148 lukem .if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
367 1.89 christos libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
368 1.89 christos .if !defined(UPDATE)
369 1.89 christos .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
370 1.89 christos .endif
371 1.152.2.1 he .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
372 1.89 christos ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
373 1.89 christos .endif
374 1.89 christos
375 1.95 mycroft .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
376 1.95 mycroft ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
377 1.147 christos ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} \
378 1.147 christos -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
379 1.58 cgd .endif
380 1.1 cgd .endif
381 1.1 cgd
382 1.1 cgd .include <bsd.man.mk>
383 1.57 jtc .include <bsd.nls.mk>
384 1.91 christos .include <bsd.files.mk>
385 1.89 christos .include <bsd.inc.mk>
386 1.109 cjs .include <bsd.links.mk>
387 1.24 mycroft .include <bsd.dep.mk>
388 1.66 christos .include <bsd.sys.mk>
389 1.117 mycroft
390 1.117 mycroft # Make sure all of the standard targets are defined, even if they do nothing.
391 1.117 mycroft lint regress:
392