Remove building with NOCRYPTO option
[minix.git] / share / mk / bsd.lib.mk
blob73867e33fa58b704449352b0c81d89089150e1ac
1 # $NetBSD: bsd.lib.mk,v 1.362 2015/09/08 16:06:42 uebayasi Exp $
2 # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
4 .include <bsd.init.mk>
5 .include <bsd.shlib.mk>
6 .include <bsd.gcc.mk>
7 # Pull in <bsd.sys.mk> here so we can override its .c.o rule
8 .include <bsd.sys.mk>
10 LIBISMODULE?= no
11 LIBISPRIVATE?= no
12 LIBISCXX?= no
14 .if ${LIBISMODULE} != "no"
15 _LIB_PREFIX?= # empty
16 MKDEBUGLIB:= no
17 MKLINT:= no
18 MKPICINSTALL:= no
19 MKPROFILE:= no
20 MKSTATICLIB:= no
21 .else
22 _LIB_PREFIX?= lib
23 .endif
25 .if ${LIBISPRIVATE} != "no"
26 MKDEBUGLIB:= no
27 MKLINT:= no
28 MKPICINSTALL:= no
29 . if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
30 MKSTATICLIB:= no
31 . else
32 MKPIC:= no
33 . endif
34 MKPROFILE:= no
35 .endif
37 ##### Basic targets
38 .PHONY: checkver libinstall
39 realinstall: checkver libinstall
41 ##### LIB specific flags.
42 # XXX: This is needed for programs that link with .a libraries
43 # Perhaps a more correct solution is to always generate _pic.a
44 # files or always have a shared library.
45 .if defined(MKPIE) && (${MKPIE} != "no")
46 CFLAGS+= ${PIE_CFLAGS}
47 AFLAGS+= ${PIE_AFLAGS}
48 .endif
50 ##### Libraries that this may depend upon.
51 .if defined(LIBDPLIBS) && ${MKPIC} != "no" # {
52 .for _lib _dir in ${LIBDPLIBS}
53 .if !defined(LIBDO.${_lib})
54 LIBDO.${_lib}!= cd "${_dir}" && ${PRINTOBJDIR}
55 .MAKEOVERRIDES+=LIBDO.${_lib}
56 .endif
57 .if ${LIBDO.${_lib}} == "_external"
58 LDADD+= -l${_lib}
59 .else
60 LDADD+= -L${LIBDO.${_lib}} -l${_lib}
61 DPADD+= ${LIBDO.${_lib}}/lib${_lib}.so # Don't use _LIB_PREFIX
62 .endif
63 .endfor
64 .endif # }
66 ##### Build and install rules
67 MKDEP_SUFFIXES?= .o .po .pico .go .ln .d
69 .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE}) # {
70 SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
71 SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
72 SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
74 DPADD+= ${SHLIB_VERSION_FILE}
76 # Check for higher installed library versions.
77 .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
78 exists(${NETBSDSRCDIR}/lib/checkver)
79 checkver:
80 @(cd "${.CURDIR}" && \
81 HOST_SH=${HOST_SH:Q} AWK=${TOOL_AWK:Q} \
82 ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
83 -d ${_DEST.OBJ} ${LIB})
84 .endif
85 .endif # }
87 .if !target(checkver)
88 checkver:
89 .endif
91 print-shlib-major:
92 .if defined(SHLIB_MAJOR) && ${MKPIC} != "no"
93 @echo ${SHLIB_MAJOR}
94 .else
95 @false
96 .endif
98 print-shlib-minor:
99 .if defined(SHLIB_MINOR) && ${MKPIC} != "no"
100 @echo ${SHLIB_MINOR}
101 .else
102 @false
103 .endif
105 print-shlib-teeny:
106 .if defined(SHLIB_TEENY) && ${MKPIC} != "no"
107 @echo ${SHLIB_TEENY}
108 .else
109 @false
110 .endif
112 .if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR) # {
113 .if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
114 .if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
115 SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
116 .else
117 SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
118 .endif
119 .else
120 SHLIB_FULLVERSION=${SHLIB_MAJOR}
121 .endif
122 .endif # }
124 # add additional suffixes not exported.
125 # .po is used for profiling object files.
126 # .pico is used for PIC object files.
127 .SUFFIXES: .out .a .ln .pico .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r .y .l .cl .p .h
128 .SUFFIXES: .sh .m4 .m
131 # Set PICFLAGS to cc flags for producing position-independent code,
132 # if not already set.
134 # Data-driven table using make variables to control how shared libraries
135 # are built for different platforms and object formats.
136 # SHLIB_MAJOR, SHLIB_MINOR, SHLIB_TEENY: Major, minor, and teeny version
137 # numbers of shared library
138 # SHLIB_SOVERSION: version number to be compiled into a shared library
139 # via -soname. Usualy ${SHLIB_MAJOR} on ELF.
140 # NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
141 # [.${SHLIB_TEENY}]]
142 # SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
143 # with ELF, also set shared-lib version for ld.so.
144 # SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
145 # SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
147 PICFLAGS ?= -fPIC
149 .if ${MKPICLIB} != "no"
150 CSHLIBFLAGS+= ${PICFLAGS}
151 .endif
153 .if defined(CSHLIBFLAGS) && !empty(CSHLIBFLAGS)
154 MKSHLIBOBJS= yes
155 .else
156 MKSHLIBOBJS= no
157 .endif
159 .if (defined(MKDEBUG) && (${MKDEBUG} != "no")) || \
160 (defined(CFLAGS) && !empty(CFLAGS:M*-g*))
161 # We only add -g to the shared library objects
162 # because we don't currently split .a archives.
163 CSHLIBFLAGS+= -g
164 .if ${LIBISPRIVATE} == "yes"
165 CFLAGS+= -g
166 .endif
167 .endif
169 # Platform-independent linker flags for ELF shared libraries
170 SHLIB_SOVERSION= ${SHLIB_MAJOR}
171 SHLIB_SHFLAGS= -Wl,-soname,${_LIB}.so.${SHLIB_SOVERSION}
172 .if !defined(SHLIB_WARNTEXTREL) || ${SHLIB_WARNTEXTREL} != "no"
173 SHLIB_SHFLAGS+= -Wl,--warn-shared-textrel
174 .endif
175 .if !defined(SHLIB_MKMAP) || ${SHLIB_MKMAP} != "no"
176 SHLIB_SHFLAGS+= -Wl,-Map=${_LIB}.so.${SHLIB_SOVERSION}.map
177 .endif
178 CLEANFILES+= ${_LIB}.so.${SHLIB_SOVERSION}.map
179 SHLIB_LDSTARTFILE?= ${_GCC_CRTI} ${_GCC_CRTBEGINS}
180 SHLIB_LDENDFILE?= ${_GCC_CRTENDS} ${_GCC_CRTN}
182 CFLAGS+= ${COPTS}
183 OBJCFLAGS+= ${OBJCOPTS}
184 AFLAGS+= ${COPTS}
185 FFLAGS+= ${FOPTS}
187 .if defined(CTFCONVERT)
188 .if defined(CFLAGS) && !empty(CFLAGS:M*-g*)
189 CTFFLAGS+= -g
190 .if defined(HAVE_GCC) && ${HAVE_GCC} >= 48
191 #CFLAGS+= -gdwarf-2
192 .endif
193 .endif
194 .endif
196 LIBSTRIPAOBJS= yes
197 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
198 LIBSTRIPCOBJS= yes
199 .endif
200 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
201 LIBSTRIPOBJCOBJS= yes
202 .endif
203 .if !defined(FFLAGS) || empty(FFLAGS:M*-g*)
204 LIBSTRIPFOBJS= yes
205 .endif
206 .if !defined(CSHLIBFLAGS) || empty(CSHLIBFLAGS:M*-g*)
207 LIBSTRIPSHLIBOBJS= yes
208 .endif
210 .if defined(__MINIX) && ${USE_BITCODE:Uno} == "yes"
211 SHLIB_SHFLAGS+= -L ${DESTDIR}/usr/lib
212 SHLIB_SHFLAGS+= -Wl,-plugin=${GOLD_PLUGIN} \
213 -Wl,-plugin-opt=-disable-opt
215 SECTIONIFYPASS?=${NETBSDSRCDIR}/minix/llvm/bin/sectionify.so
216 # dcvmoole: the following construction is a hack for libmagicrt. For reasons
217 # not entirely under our control, clang refuses to take .bc objects even when
218 # using the gold linker, saying that LLVM IR code cannot be linked. In order
219 # to sidestep this, libmagicrt uses the name "foo.bc.o" instead of "foo.bc" to
220 # link the its LLVM IR objects. As all libmagicrt modules use the sectionify
221 # pass below, and this step needs temporary files, we give the temporary files
222 # the .o suffix (while anything would do!), and allow the libmagicrt makefile
223 # to override the rename to the real file name to perform a copy instead. As
224 # a result, libmagicrt ends up with both the .bc and .bc.o objects, and it can
225 # pass the latter set to clang, bypassing clang's overly strict checks.
226 SECTIONIFYMV?=mv -f
228 .S.bc: ${.TARGET:.bc=.o}
229 rm -f ${.TARGET}
230 ln ${.TARGET:.bc=.o} ${.TARGET}
231 .c.bc:
232 ${_MKTARGET_COMPILE}
233 ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} -flto
234 if [ -n '${SECTIONIFY.${.IMPSRC:T}:U${SECTIONIFY}}' ]; then \
235 ${OPT} -load ${SECTIONIFYPASS} -sectionify ${SECTIONIFY.${.IMPSRC:T}:U${SECTIONIFY}} -o ${.TARGET}.o ${.TARGET} && ${SECTIONIFYMV} ${.TARGET}.o ${.TARGET}; \
238 .cc.bc .cxx.bc .cpp.bc:
239 ${_MKTARGET_COMPILE}
240 ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} -flto
241 .endif # defined(__MINIX) && ${USE_BITCODE:Uno} == "yes"
242 .c.o:
243 ${_MKTARGET_COMPILE}
244 ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
245 .if defined(CTFCONVERT)
246 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
247 .endif
248 .if defined(LIBSTRIPCOBJS)
249 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
250 .endif
252 .c.po:
253 ${_MKTARGET_COMPILE}
254 ${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
255 .if defined(CTFCONVERT)
256 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
257 .endif
258 .if defined(LIBSTRIPCOBJS)
259 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
260 .endif
262 .c.go:
263 ${_MKTARGET_COMPILE}
264 ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
266 .c.pico:
267 ${_MKTARGET_COMPILE}
268 ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
269 .if defined(LIBSTRIPSHLIBOBJS)
270 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
271 .endif
273 .cc.o .cpp.o .cxx.o .C.o:
274 ${_MKTARGET_COMPILE}
275 ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
276 .if defined(LIBSTRIPCOBJS)
277 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
278 .endif
280 .cc.po .cpp.po .cxx.po .C.po:
281 ${_MKTARGET_COMPILE}
282 ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
283 .if defined(LIBSTRIPCOBJS)
284 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
285 .endif
287 .cc.go .cpp.go .cxx.go .C.go:
288 ${_MKTARGET_COMPILE}
289 ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
291 .cc.pico .cpp.pico .cxx.pico .C.pico:
292 ${_MKTARGET_COMPILE}
293 ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
294 .if defined(LIBSTRIPSHLIBOBJS)
295 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
296 .endif
298 .f.o:
299 ${_MKTARGET_COMPILE}
300 ${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
301 .if defined(CTFCONVERT)
302 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
303 .endif
304 .if defined(LIBSTRIPFOBJS)
305 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
306 .endif
308 .f.po:
309 ${_MKTARGET_COMPILE}
310 ${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
311 .if defined(CTFCONVERT)
312 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
313 .endif
314 .if defined(LIBSTRIPFOBJS)
315 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
316 .endif
318 .f.go:
319 ${_MKTARGET_COMPILE}
320 ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
322 .f.pico:
323 ${_MKTARGET_COMPILE}
324 ${COMPILE.f} ${PICFLAGS} ${.IMPSRC} -o ${.TARGET}
325 .if defined(LIBSTRIPFOBJS)
326 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
327 .endif
329 .f.ln:
330 ${_MKTARGET_COMPILE}
331 @echo Skipping lint for Fortran libraries.
333 .m.o:
334 ${_MKTARGET_COMPILE}
335 ${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
336 .if defined(CTFCONVERT)
337 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
338 .endif
339 .if defined(LIBSTRIPOBJCOBJS)
340 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
341 .endif
343 .m.po:
344 ${_MKTARGET_COMPILE}
345 ${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
346 .if defined(CTFCONVERT)
347 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
348 .endif
349 .if defined(LIBSTRIPOBJCOBJS)
350 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
351 .endif
353 .m.go:
354 ${_MKTARGET_COMPILE}
355 ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
356 .if defined(LIBSTRIPOBJCOBJS)
357 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
358 .endif
360 .m.pico:
361 ${_MKTARGET_COMPILE}
362 ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
363 .if defined(LIBSTRIPOBJCOBJS)
364 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
365 .endif
367 .s.o:
368 ${_MKTARGET_COMPILE}
369 ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
370 .if defined(CTFCONVERT)
371 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
372 .endif
373 .if defined(LIBSTRIPAOBJS)
374 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
375 .endif
377 .S.o:
378 ${_MKTARGET_COMPILE}
379 ${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
380 .if defined(CTFCONVERT)
381 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
382 .endif
383 .if defined(LIBSTRIPAOBJS)
384 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
385 .endif
387 .s.po:
388 ${_MKTARGET_COMPILE}
389 ${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
390 .if defined(CTFCONVERT)
391 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
392 .endif
393 .if defined(LIBSTRIPAOBJS)
394 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
395 .endif
397 .S.po:
398 ${_MKTARGET_COMPILE}
399 ${COMPILE.S} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
400 .if defined(CTFCONVERT)
401 ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
402 .endif
403 .if defined(LIBSTRIPAOBJS)
404 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
405 .endif
407 .s.go:
408 ${_MKTARGET_COMPILE}
409 ${COMPILE.s} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
411 .S.go:
412 ${_MKTARGET_COMPILE}
413 ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
415 .s.pico:
416 ${_MKTARGET_COMPILE}
417 ${COMPILE.s} ${PICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
418 .if defined(LIBSTRIPAOBJS)
419 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
420 .endif
422 .S.pico:
423 ${_MKTARGET_COMPILE}
424 ${COMPILE.S} ${PICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
425 .if defined(LIBSTRIPAOBJS)
426 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
427 .endif
429 # Declare a few variables to make our life easier later.
430 _LIB:=${_LIB_PREFIX}${LIB}
431 _LIB.a:=${_LIB}.a
432 _LIB_p.a:=${_LIB}_p.a
433 _LIB_g.a:=${_LIB}_g.a
434 _LIB_pic.a:=${_LIB}_pic.a
435 _LIB.ln:=llib-l${LIB}.ln
436 .if defined(__MINIX) && ${USE_BITCODE:Uno} == "yes"
437 _LIB_bc.a:=${_LIB}_bc.a
438 .endif # defined(__MINIX)
440 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
441 _LIB.so:=${_LIB}.so
442 _LIB.so.major:=${_LIB}.so.${SHLIB_MAJOR}
443 _LIB.so.full:=${_LIB}.so.${SHLIB_FULLVERSION}
444 _LIB.so.link:=${_LIB}.so.${SHLIB_FULLVERSION}.link
445 .if ${MKDEBUG} != "no"
446 _LIB.so.debug:=${_LIB.so.full}.debug
447 .endif
448 .endif
450 _DEST.LIB:=${DESTDIR}${LIBDIR}
451 _DEST.OBJ:=${DESTDIR}${_LIBSODIR}
452 _DEST.LINT:=${DESTDIR}${LINTLIBDIR}
453 _DEST.DEBUG:=${DESTDIR}${DEBUGDIR}${LIBDIR}
454 _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR}
456 .if defined(LIB) # {
457 .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
458 || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
459 _LIBS=${_LIB.a}
460 .else
461 _LIBS=
462 .endif
464 .if ${LIBISPRIVATE} != "no" \
465 && (defined(USE_COMBINE) && ${USE_COMBINE} == "yes" \
466 && !defined(NOCOMBINE)) # {
467 .for f in ${SRCS:N*.h:N*.sh:C/\.[yl]$/.c/g}
468 COMBINEFLAGS.${LIB}.$f := ${CPPFLAGS.$f:D1} ${CPUFLAGS.$f:D2} ${COPTS.$f:D3} ${OBJCOPTS.$f:D4} ${CXXFLAGS.$f:D5}
469 .if empty(COMBINEFLAGS.${LIB}.${f}) && !defined(NOCOMBINE.$f)
470 COMBINESRCS+= ${f}
471 NODPSRCS+= ${f}
472 .else
473 OBJS+= ${f:R:S/$/.o/}
474 .endif
475 .endfor
477 .if !empty(COMBINESRCS)
478 OBJS+= ${_LIB}_combine.o
479 ${_LIB}_combine.o: ${COMBINESRCS}
480 ${_MKTARGET_COMPILE}
481 ${COMPILE.c} -MD --combine ${.ALLSRC} -o ${.TARGET}
482 .if defined(LIBSTRIPOBJS)
483 ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
484 .endif
486 CLEANFILES+= ${_LIB}_combine.d
488 .if exists("${_LIB}_combine.d")
489 .include "${_LIB}_combine.d"
490 .endif
491 .endif # empty(XSRCS.${LIB})
492 .else # } {
493 OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
494 .endif # }
496 STOBJS+=${OBJS}
498 LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
500 .if ${LIBISPRIVATE} != "no"
501 # No installation is required
502 libinstall::
503 .endif
505 .if ${MKDEBUGLIB} != "no"
506 _LIBS+=${_LIB_g.a}
507 GOBJS+=${OBJS:.o=.go}
508 DEBUGFLAGS?=-DDEBUG
509 .endif
511 .if ${MKPROFILE} != "no"
512 _LIBS+=${_LIB_p.a}
513 POBJS+=${OBJS:.o=.po}
514 PROFFLAGS?=-DGPROF -DPROF
515 .endif
517 .if ${MKPIC} != "no" # {
518 .if ${MKPICLIB} == "no"
519 .if ${MKSHLIBOBJS} != "no"
520 # make _pic.a, which isn't really pic,
521 # since it's needed for making shared lib.
522 # but don't install it.
523 SOLIB=${_LIB_pic.a}
524 SOBJS+=${OBJS:.o=.pico}
525 .else
526 SOLIB=${_LIB.a}
527 .endif
528 .else
529 SOLIB=${_LIB_pic.a}
530 _LIBS+=${SOLIB}
531 SOBJS+=${OBJS:.o=.pico}
532 .endif
533 .if defined(SHLIB_FULLVERSION)
534 _LIBS+=${_LIB.so.full}
535 .endif
536 .endif # }
538 .if ${MKLINT} != "no" && !empty(LOBJS)
539 _LIBS+=${_LIB.ln}
540 .endif
542 ALLOBJS=
543 .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
544 || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
545 ALLOBJS+=${STOBJS}
546 .endif
547 ALLOBJS+=${POBJS} ${SOBJS}
548 .if ${MKLINT} != "no" && !empty(LOBJS)
549 ALLOBJS+=${LOBJS}
550 .endif
551 .else # !defined(LIB) # } {
552 LOBJS=
553 SOBJS=
554 .endif # !defined(LIB) # }
556 _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
558 .if ${USE_BITCODE:Uno} == "yes"
559 .if defined(LIB)
560 _LIBS+=${_LIB_bc.a}
561 .endif
562 .endif # ${USE_BITCODE:Uno} == "yes"
564 .NOPATH: ${ALLOBJS} ${_LIBS} ${_YLSRCS}
566 realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.so.debug}
568 MKARZERO?= ${MKREPRO:Uno}
570 .if ${MKARZERO} == "yes"
571 _ARFL=crsD
572 _ARRANFL=sD
573 _INSTRANLIB=
574 .else
575 _ARFL=crs
576 _ARRANFL=s
577 .if ${USE_BITCODE:Uno} == "yes"
578 _INSTRANLIB=${empty(PRESERVE):?-a "${AR} --plugin ${GOLD_PLUGIN} -s":}
579 .else
580 _INSTRANLIB=${empty(PRESERVE):?-a "${RANLIB} -t":}
581 .endif # ${USE_BITCODE:Uno} == "yes"
582 .endif
584 # If you change this, please consider reflecting the change in
585 # the override in sys/rump/Makefile.rump.
586 .if !target(__archivebuild)
587 __archivebuild: .USE
588 ${_MKTARGET_BUILD}
589 rm -f ${.TARGET}
590 ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
591 .endif
593 .if !target(__archiveinstall)
594 __archiveinstall: .USE
595 ${_MKTARGET_INSTALL}
596 ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
597 ${_INSTRANLIB} ${.ALLSRC} ${.TARGET}
598 .endif
600 __archivesymlinkpic: .USE
601 ${_MKTARGET_INSTALL}
602 ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
604 DPSRCS+= ${_YLSRCS}
605 CLEANFILES+= ${_YLSRCS}
607 ${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
609 .if ${USE_BITCODE:Uno} == "yes"
611 .if !target(__archivebuildbc)
612 __archivebuildbc: .USE
613 ${_MKTARGET_BUILD}
614 rm -f ${.TARGET}
615 ${AR} ${_ARFL} --plugin ${GOLD_PLUGIN} ${.TARGET} ${.ALLSRC:M*bc}
616 .endif
618 # LSC: Ignore libunwind in the bitcode archive, otherwise final linking chokes
619 # on libunwind hidden assembly symbols.
620 BCOBJS+=${OBJS:Nlibunwind.*:.o=.bc}
621 ALLOBJS+=${BCOBJS}
622 ${_LIB_bc.a}:: ${BCOBJS} __archivebuildbc
624 .endif # ${USE_BITCODE:Uno} == "yes"
626 ${_LIB.a}:: ${STOBJS} __archivebuild
628 ${_LIB_p.a}:: ${POBJS} __archivebuild
630 ${_LIB_pic.a}:: ${SOBJS} __archivebuild
632 ${_LIB_g.a}:: ${GOBJS} __archivebuild
635 _LIBLDOPTS=
636 .if ${SHLIBDIR} != "/usr/lib"
637 _LIBLDOPTS+= -Wl,-rpath,${SHLIBDIR} \
638 -L=${SHLIBDIR}
639 .elif ${SHLIBINSTALLDIR} != "/usr/lib"
640 _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
641 -L=${SHLIBINSTALLDIR}
642 .endif
644 # gcc -shared now adds -lc automatically. For libraries other than libc and
645 # libgcc* we add as a dependency the installed shared libc. For libc and
646 # libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that
647 # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not
648 # to add standard libraries, not the linker.
649 .if !defined(LIB)
650 .if !empty(LIBC_SO)
651 DPLIBC ?= ${DESTDIR}${LIBC_SO}
652 .endif
653 .else
654 .if ${LIB} != "c" && ${LIB:Mgcc*} == "" \
655 && ${LIB} != "sys" && ${LIB} != "minc" && ${LIB} != "mthread" # Minix-specific libs
656 .if !empty(LIBC_SO)
657 DPLIBC ?= ${DESTDIR}${LIBC_SO}
658 .endif
659 .else
660 LDLIBC ?= -nodefaultlibs
661 .if ${HAVE_LIBGCC} == "yes" && (${LIB} == "c" || ${LIB} == "minc")
662 .if !defined(__MINIX)
663 LDADD+= -lgcc
664 .else
665 LDADD+= ${${ACTIVE_CC} == "gcc":? -lgcc:}
666 .if ${MACHINE_ARCH} == "earm"
667 LDADD+= ${${ACTIVE_CC} == "gcc":? -lgcc_eh:}
668 .endif # ${MACHINE_ARCH} == "earm"
669 .endif # !defined(__MINIX)
670 .endif
671 .endif
672 .endif
674 .if ${LIBISCXX} != "no"
675 LIBCC:= ${CXX}
676 . if ${MKLIBCXX} == "yes"
677 LIBDPLIBS+= c++ ${.CURDIR}/../../../../../external/bsd/libc++/lib
678 . else
679 LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
680 . endif
681 .else
682 LIBCC:= ${CC}
683 .endif
685 _LDADD.${_LIB}= ${LDADD} ${LDADD.${_LIB}}
686 _LDFLAGS.${_LIB}= ${LDFLAGS} ${LDFLAGS.${_LIB}}
688 _MAINLIBDEPS= ${SOLIB} ${DPADD} ${DPLIBC} \
689 ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
691 .if defined(_LIB.so.debug)
692 ${_LIB.so.debug}: ${_LIB.so.link}
693 ${_MKTARGET_CREATE}
694 ( ${OBJCOPY} --only-keep-debug \
695 ${_LIB.so.link} ${_LIB.so.debug} \
696 ) || (rm -f ${.TARGET}; false)
697 ${_LIB.so.full}: ${_LIB.so.link} ${_LIB.so.debug}
698 ${_MKTARGET_CREATE}
699 ( ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
700 --add-gnu-debuglink=${_LIB.so.debug} \
701 ${_LIB.so.link} ${_LIB.so.full} \
702 ) || (rm -f ${.TARGET}; false)
703 ${_LIB.so.link}: ${_MAINLIBDEPS}
704 .else # aka no MKDEBUG
705 ${_LIB.so.full}: ${_MAINLIBDEPS}
706 .endif
707 ${_MKTARGET_BUILD}
708 rm -f ${.TARGET}
709 ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} \
710 ${_LDFLAGS.${_LIB}} -o ${.TARGET} ${_LIBLDOPTS} \
711 -Wl,--whole-archive ${SOLIB} \
712 -Wl,--no-whole-archive ${_LDADD.${_LIB}}
713 # We don't use INSTALL_SYMLINK here because this is just
714 # happening inside the build directory/objdir. XXX Why does
715 # this spend so much effort on libraries that aren't live??? XXX
716 # XXX Also creates dead symlinks until the .full rule runs
717 # above and creates the main link
718 .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
719 "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
720 ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so.major}.tmp
721 mv -f ${_LIB.so.major}.tmp ${_LIB.so.major}
722 .endif
723 ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so}.tmp
724 mv -f ${_LIB.so}.tmp ${_LIB.so}
725 .if ${MKSTRIPIDENT} != "no"
726 ${OBJCOPY} -R .ident ${.TARGET}
727 .endif
729 .if !empty(LOBJS) # {
730 LLIBS?= -lc
731 ${_LIB.ln}: ${LOBJS}
732 ${_MKTARGET_COMPILE}
733 rm -f ${.TARGET}
734 .if defined(DESTDIR)
735 ${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
736 .else
737 ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
738 .endif
739 .endif # }
741 lint: ${LOBJS}
742 .if defined(LOBJS) && !empty(LOBJS)
743 ${LINT} ${LINTFLAGS} ${LOBJS}
744 .endif
747 # If the number of entries in CLEANFILES is too large, then the
748 # commands in bsd.clean.mk encounter errors like "exec(/bin/sh)
749 # failed (Argument list too long)". Avoid that by splitting the
750 # files to clean into several lists using different variable names.
751 # __cleanuse is an internal target in bsd.clean.mk; the way we
752 # use it here mimics the way it's used by the clean target in
753 # bsd.clean.mk.
755 clean: libclean1 libclean2 libclean3 libclean4 libclean5
756 libclean1: .PHONY .MADE __cleanuse LIBCLEANFILES1
757 libclean2: .PHONY .MADE __cleanuse LIBCLEANFILES2
758 libclean3: .PHONY .MADE __cleanuse LIBCLEANFILES3
759 libclean4: .PHONY .MADE __cleanuse LIBCLEANFILES4
760 libclean5: .PHONY .MADE __cleanuse LIBCLEANFILES5
761 .if defined(__MINIX)
762 # MINIX: core conflicts with core/ in lib/liblwip
763 CLEANFILES+= a.out [Ee]rrs mklog *.core
764 .else
765 CLEANFILES+= a.out [Ee]rrs mklog core *.core
766 .endif # defined(__MINIX)
767 LIBCLEANFILES1+= ${_LIB.a} ${STOBJS} ${STOBJS:=.tmp}
768 LIBCLEANFILES2+= ${_LIB_p.a} ${POBJS} ${POBJS:=.tmp}
769 LIBCLEANFILES3+= ${_LIB_g.a} ${GOBJS} ${GOBJS:=.tmp}
770 LIBCLEANFILES4+= ${_LIB_pic.a}
771 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
772 LIBCLEANFILES4+= ${_LIB.so}.* ${_LIB.so} ${_LIB.so.debug}
773 .endif
774 LIBCLEANFILES4+= ${SOBJS} ${SOBJS:=.tmp}
775 LIBCLEANFILES5+= ${_LIB.ln} ${LOBJS}
777 .if defined(__MINIX)
778 clean: libclean6
779 libclean6: .PHONY .MADE __cleanuse LIBCLEANFILES6
780 LIBCLEANFILES6+= ${_LIB_bc.a} ${BCOBJS} ${BCOBJS:=.tmp}
781 .endif
783 .if !target(libinstall) # {
784 # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
785 libinstall::
787 .if ${USE_BITCODE:Uno} == "yes"
788 libinstall:: ${_DEST.LIB}/bc/${_LIB.a}
789 .PRECIOUS: ${_DEST.LIB}/bc/${_LIB.a}
791 .if ${MKUPDATE} == "no"
792 .if !defined(BUILD) && !make(all) && !make(${_LIB_bc.a})
793 ${_DEST.LIB}/bc/${_LIB.a}! .MADE
794 .endif
795 ${_DEST.LIB}/bc/${_LIB.a}! ${_LIB_bc.a} __archiveinstall
796 .else
797 .if !defined(BUILD) && !make(all) && !make(${_LIB_bc.a})
798 ${_DEST.LIB}/bc/${_LIB.a}: .MADE
799 .endif
800 ${_DEST.LIB}/bc/${_LIB.a}: ${_LIB_bc.a} __archiveinstall
801 .endif
802 .endif # ${USE_BITCODE:Uno} == "yes"
804 .if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no"
805 libinstall:: ${_DEST.LIB}/${_LIB.a}
806 .PRECIOUS: ${_DEST.LIB}/${_LIB.a}
808 .if ${MKUPDATE} == "no"
809 .if !defined(BUILD) && !make(all) && !make(${_LIB.a})
810 ${_DEST.LIB}/${_LIB.a}! .MADE
811 .endif
812 ${_DEST.LIB}/${_LIB.a}! ${_LIB.a} __archiveinstall
813 .else
814 .if !defined(BUILD) && !make(all) && !make(${_LIB.a})
815 ${_DEST.LIB}/${_LIB.a}: .MADE
816 .endif
817 ${_DEST.LIB}/${_LIB.a}: ${_LIB.a} __archiveinstall
818 .endif
819 .endif
821 .if ${MKPROFILE} != "no"
822 libinstall:: ${_DEST.LIB}/${_LIB_p.a}
823 .PRECIOUS: ${_DEST.LIB}/${_LIB_p.a}
825 .if ${MKUPDATE} == "no"
826 .if !defined(BUILD) && !make(all) && !make(${_LIB_p.a})
827 ${_DEST.LIB}/${_LIB_p.a}! .MADE
828 .endif
829 ${_DEST.LIB}/${_LIB_p.a}! ${_LIB_p.a} __archiveinstall
830 .else
831 .if !defined(BUILD) && !make(all) && !make(${_LIB_p.a})
832 ${_DEST.LIB}/${_LIB_p.a}: .MADE
833 .endif
834 ${_DEST.LIB}/${_LIB_p.a}: ${_LIB_p.a} __archiveinstall
835 .endif
836 .endif
838 .if ${MKDEBUGLIB} != "no"
839 libinstall:: ${_DEST.LIB}/${_LIB_g.a}
840 .PRECIOUS: ${_DEST.LIB}/${_LIB_g.a}
842 .if ${MKUPDATE} == "no"
843 .if !defined(BUILD) && !make(all) && !make(${_LIB_g.a})
844 ${_DEST.LIB}/${_LIB_g.a}! .MADE
845 .endif
846 ${_DEST.LIB}/${_LIB_g.a}! ${_LIB_g.a} __archiveinstall
847 .else
848 .if !defined(BUILD) && !make(all) && !make(${LIB_g.a})
849 ${_DEST.LIB}/${_LIB_g.a}: .MADE
850 .endif
851 ${_DEST.LIB}/${_LIB_g.a}: ${_LIB_g.a} __archiveinstall
852 .endif
853 .endif
855 .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
856 libinstall:: ${_DEST.LIB}/${_LIB_pic.a}
857 .PRECIOUS: ${_DEST.LIB}/${_LIB_pic.a}
859 .if ${MKUPDATE} == "no"
860 .if !defined(BUILD) && !make(all) && !make(${_LIB_pic.a})
861 ${_DEST.LIB}/${_LIB_pic.a}! .MADE
862 .endif
863 .if ${MKPICLIB} == "no"
864 ${_DEST.LIB}/${_LIB_pic.a}! ${_LIB.a} __archivesymlinkpic
865 .else
866 ${_DEST.LIB}/${_LIB_pic.a}! ${_LIB_pic.a} __archiveinstall
867 .endif
868 .else
869 .if !defined(BUILD) && !make(all) && !make(${_LIB_pic.a})
870 ${_DEST.LIB}/${_LIB_pic.a}: .MADE
871 .endif
872 .if ${MKPICLIB} == "no"
873 ${_DEST.LIB}/${_LIB_pic.a}: ${_LIB.a} __archivesymlinkpic
874 .else
875 ${_DEST.LIB}/${_LIB_pic.a}: ${_LIB_pic.a} __archiveinstall
876 .endif
877 .endif
878 .endif
880 .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
882 libinstall:: ${_DEST.OBJ}/${_LIB.so.full}
883 .PRECIOUS: ${_DEST.OBJ}/${_LIB.so.full}
885 .if ${MKUPDATE} == "no"
886 .if !defined(BUILD) && !make(all) && !make(${_LIB.so.full})
887 ${_DEST.OBJ}/${_LIB.so.full}! .MADE
888 .endif
889 ${_DEST.OBJ}/${_LIB.so.full}! ${_LIB.so.full}
890 .else
891 .if !defined(BUILD) && !make(all) && !make(${_LIB.so.full})
892 ${_DEST.OBJ}/${_LIB.so.full}: .MADE
893 .endif
894 ${_DEST.OBJ}/${_LIB.so.full}: ${_LIB.so.full}
895 .endif
896 ${_MKTARGET_INSTALL}
897 ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
898 ${.ALLSRC} ${.TARGET}
899 .if ${_LIBSODIR} != ${LIBDIR}
900 ${INSTALL_SYMLINK} -l r ${_DEST.OBJ}/${_LIB.so.full} \
901 ${_DEST.LIB}/${_LIB.so.full}
902 .endif
903 .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
904 "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
905 ${INSTALL_SYMLINK} ${_LIB.so.full} ${_DEST.OBJ}/${_LIB.so.major}
906 .if ${_LIBSODIR} != ${LIBDIR}
907 ${INSTALL_SYMLINK} -l r ${_DEST.OBJ}/${_LIB.so.full} \
908 ${_DEST.LIB}/${_LIB.so.major}
909 .endif
910 .endif
911 .if ${MKLINKLIB} != "no"
912 ${INSTALL_SYMLINK} ${_LIB.so.full} ${_DEST.OBJ}/${_LIB.so}
913 .if ${_LIBSODIR} != ${LIBDIR}
914 ${INSTALL_SYMLINK} -l r ${_DEST.OBJ}/${_LIB.so.full} \
915 ${_DEST.LIB}/${_LIB.so}
916 .endif
917 .endif
918 .endif
920 .if defined(_LIB.so.debug)
921 libinstall:: ${_DEST.DEBUG}/${_LIB.so.debug}
922 .PRECIOUS: ${_DEST.DEBUG}/${_LIB.so.debug}
924 ${_DEST.DEBUG}/${_LIB.so.debug}: ${_LIB.so.debug}
925 ${_MKTARGET_INSTALL}
926 ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
927 ${.ALLSRC} ${.TARGET}
928 .if ${_LIBSODIR} != ${LIBDIR}
929 ${INSTALL_SYMLINK} -l r ${_DEST.DEBUG}/${_LIB.so.debug} \
930 ${_DEST.ODEBUG}/${_LIB.so.debug}
931 .endif
932 .endif
934 .if ${MKLINT} != "no" && !empty(LOBJS)
935 libinstall:: ${_DEST.LINT}/${_LIB.ln}
936 .PRECIOUS: ${_DEST.LINT}/${_LIB.ln}
938 .if ${MKUPDATE} == "no"
939 .if !defined(BUILD) && !make(all) && !make(${_LIB.ln})
940 ${_DEST.LINT}/${_LIB.ln}! .MADE
941 .endif
942 ${_DEST.LINT}/${_LIB.ln}! ${_LIB.ln}
943 .else
944 .if !defined(BUILD) && !make(all) && !make(${_LIB.ln})
945 ${_DEST.LINT}/${_LIB.ln}: .MADE
946 .endif
947 ${_DEST.LINT}/${_LIB.ln}: ${_LIB.ln}
948 .endif
949 ${_MKTARGET_INSTALL}
950 ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
951 ${.ALLSRC} ${_DEST.LINT}
952 .endif
953 .endif # !target(libinstall) # }
955 ##### Pull in related .mk logic
956 LINKSOWN?= ${LIBOWN}
957 LINKSGRP?= ${LIBGRP}
958 LINKSMODE?= ${LIBMODE}
959 .include <bsd.man.mk>
960 .include <bsd.nls.mk>
961 .include <bsd.files.mk>
962 .include <bsd.inc.mk>
963 .include <bsd.links.mk>
964 .include <bsd.dep.mk>
965 .include <bsd.clang-analyze.mk>
966 .include <bsd.clean.mk>
968 ${TARGETS}: # ensure existence