Annotation of src/share/mk/bsd.lib.mk, Revision 1.315
1.315 ! joerg 1: # $NetBSD: bsd.lib.mk,v 1.314 2011/04/11 23:03:38 joerg Exp $
1.92 mikel 2: # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
1.1 cgd 3:
1.188 tv 4: .include <bsd.init.mk>
1.207 thorpej 5: .include <bsd.shlib.mk>
1.219 thorpej 6: .include <bsd.gcc.mk>
1.227 lukem 7: # Pull in <bsd.sys.mk> here so we can override its .c.o rule
8: .include <bsd.sys.mk>
1.97 mycroft 9:
1.282 lukem 10: LIBISMODULE?= no
1.281 lukem 11: LIBISPRIVATE?= no
1.291 mrg 12: LIBISCXX?= no
1.281 lukem 13:
1.282 lukem 14: _LIB_PREFIX= lib
15:
16: .if ${LIBISMODULE} != "no"
17: _LIB_PREFIX= # empty
18: MKDEBUGLIB:= no
19: MKLINT:= no
20: MKPICINSTALL:= no
21: MKPROFILE:= no
22: MKSTATICLIB:= no
23: .endif
24:
1.281 lukem 25: .if ${LIBISPRIVATE} != "no"
1.280 lukem 26: MKDEBUGLIB:= no
27: MKLINT:= no
1.290 cube 28: MKPICINSTALL:= no
29: . if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
30: MKSTATICLIB:= no
31: . else
1.280 lukem 32: MKPIC:= no
1.290 cube 33: . endif
1.280 lukem 34: MKPROFILE:= no
35: .endif
36:
1.188 tv 37: ##### Basic targets
1.246 lukem 38: .PHONY: checkver libinstall
1.143 erh 39: realinstall: checkver libinstall
1.183 tv 40: clean: cleanlib
1.232 erh 41:
42: ##### LIB specific flags.
1.287 christos 43: # XXX: This is needed for programs that link with .a libraries
44: # Perhaps a more correct solution is to always generate _pic.a
45: # files or always have a shared library.
46: .if defined(MKPIE) && (${MKPIE} != "no")
47: CFLAGS+= ${PIE_CFLAGS}
1.288 christos 48: AFLAGS+= ${PIE_AFLAGS}
1.287 christos 49: .endif
1.1 cgd 50:
1.256 lukem 51: ##### Libraries that this may depend upon.
52: .if defined(LIBDPLIBS) && ${MKPIC} != "no" # {
53: .for _lib _dir in ${LIBDPLIBS}
54: .if !defined(LIBDO.${_lib})
1.303 christos 55: LIBDO.${_lib}!= cd "${_dir}" && ${PRINTOBJDIR}
1.256 lukem 56: .MAKEOVERRIDES+=LIBDO.${_lib}
57: .endif
58: LDADD+= -L${LIBDO.${_lib}} -l${_lib}
59: DPADD+= ${LIBDO.${_lib}}/lib${_lib}.so
60: .endfor
61: .endif # }
62:
1.188 tv 63: ##### Build and install rules
1.304 njoly 64: MKDEP_SUFFIXES?= .o .po .pico .go .ln
1.292 pooka 65:
1.252 lukem 66: .if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE}) # {
1.154 simonb 67: SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
68: SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
1.171 christos 69: SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
1.143 erh 70:
1.295 he 71: DPADD+= ${SHLIB_VERSION_FILE}
72:
1.143 erh 73: # Check for higher installed library versions.
1.145 erh 74: .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
1.201 lukem 75: exists(${NETBSDSRCDIR}/lib/checkver)
1.143 erh 76: checkver:
1.303 christos 77: @(cd "${.CURDIR}" && \
1.289 apb 78: HOST_SH=${HOST_SH:Q} AWK=${TOOL_AWK:Q} \
1.239 lukem 79: ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
1.195 lukem 80: -d ${DESTDIR}${_LIBSODIR} ${LIB})
1.173 christos 81: .endif
1.252 lukem 82: .endif # }
1.173 christos 83:
84: .if !target(checkver)
1.143 erh 85: checkver:
86: .endif
1.173 christos 87:
1.169 thorpej 88: print-shlib-major:
1.185 tv 89: .if defined(SHLIB_MAJOR) && ${MKPIC} != "no"
1.169 thorpej 90: @echo ${SHLIB_MAJOR}
1.173 christos 91: .else
92: @false
93: .endif
1.169 thorpej 94:
95: print-shlib-minor:
1.185 tv 96: .if defined(SHLIB_MINOR) && ${MKPIC} != "no"
1.169 thorpej 97: @echo ${SHLIB_MINOR}
1.173 christos 98: .else
99: @false
100: .endif
1.171 christos 101:
102: print-shlib-teeny:
1.185 tv 103: .if defined(SHLIB_TEENY) && ${MKPIC} != "no"
1.171 christos 104: @echo ${SHLIB_TEENY}
1.143 erh 105: .else
1.169 thorpej 106: @false
1.173 christos 107: .endif
1.169 thorpej 108:
1.252 lukem 109: .if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR) # {
1.173 christos 110: .if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
111: .if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
112: SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
113: .else
114: SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
115: .endif
116: .else
117: SHLIB_FULLVERSION=${SHLIB_MAJOR}
118: .endif
1.252 lukem 119: .endif # }
1.1 cgd 120:
1.101 mycroft 121: # add additional suffixes not exported.
122: # .po is used for profiling object files.
1.304 njoly 123: # .pico is used for PIC object files.
124: .SUFFIXES: .out .a .ln .pico .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r .y .l .cl .p .h
1.118 lukem 125: .SUFFIXES: .sh .m4 .m
1.82 mikel 126:
1.86 jonathan 127:
128: # Set PICFLAGS to cc flags for producing position-independent code,
129: # if not already set. Includes -DPIC, if required.
130:
1.164 simonb 131: # Data-driven table using make variables to control how shared libraries
1.86 jonathan 132: # are built for different platforms and object formats.
1.302 abs 133: # SHLIB_MAJOR, SHLIB_MINOR, SHLIB_TEENY: Major, minor, and teeny version
134: # numbers of shared library
1.164 simonb 135: # SHLIB_SOVERSION: version number to be compiled into a shared library
136: # via -soname. Usualy ${SHLIB_MAJOR} on ELF.
1.173 christos 137: # NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
138: # [.${SHLIB_TEENY}]]
1.164 simonb 139: # SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
1.123 jonathan 140: # with ELF, also set shared-lib version for ld.so.
141: # SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
142: # SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
1.304 njoly 143: # FPICFLAGS: flags for ${FC} to compile .[fF] files to .pico objects.
1.271 tsutsui 144: # CPPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
1.205 yamt 145: # CPICFLAGS: flags for ${CC} to compile .[cC] files to pic objects.
1.304 njoly 146: # CSHLIBFLAGS: flags for ${CC} to compile .[cC] files to .pico objects.
1.205 yamt 147: # (usually includes ${CPICFLAGS})
148: # CAPICFLAGS: flags for ${CC} to compiling .[Ss] files
1.107 jonathan 149: # (usually just ${CPPPICFLAGS} ${CPICFLAGS})
1.304 njoly 150: # APICFLAGS: flags for ${AS} to assemble .[sS] to .pico objects.
1.86 jonathan 151:
1.252 lukem 152: .if ${MACHINE_ARCH} == "alpha" # {
1.209 thorpej 153:
1.179 dmcmahil 154: FPICFLAGS ?= -fPIC
1.165 dmcmahil 155: CPICFLAGS ?= -fPIC -DPIC
1.222 lukem 156: CPPPICFLAGS?= -DPIC
1.107 jonathan 157: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
158: APICFLAGS ?=
1.209 thorpej 159:
1.308 mrg 160: .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") # } {
1.209 thorpej 161:
1.222 lukem 162: # If you use -fPIC you need to define BIGPIC to turn on 32-bit
1.202 eeh 163: # relocations in asm code
1.179 dmcmahil 164: FPICFLAGS ?= -fPIC
1.165 dmcmahil 165: CPICFLAGS ?= -fPIC -DPIC
1.202 eeh 166: CPPPICFLAGS?= -DPIC -DBIGPIC
1.150 christos 167: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
1.203 eeh 168: APICFLAGS ?= -KPIC
1.204 fredette 169:
1.252 lukem 170: .else # } {
1.86 jonathan 171:
1.244 skrll 172: # Platform-independent flags for NetBSD shared libraries
1.171 christos 173: SHLIB_SOVERSION=${SHLIB_FULLVERSION}
1.125 jonathan 174: SHLIB_SHFLAGS=
1.179 dmcmahil 175: FPICFLAGS ?= -fPIC
1.165 dmcmahil 176: CPICFLAGS?= -fPIC -DPIC
1.222 lukem 177: CPPPICFLAGS?= -DPIC
1.107 jonathan 178: CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
179: APICFLAGS?= -k
1.86 jonathan 180:
1.252 lukem 181: .endif # }
1.160 simonb 182:
1.205 yamt 183: .if ${MKPICLIB} != "no"
184: CSHLIBFLAGS+= ${CPICFLAGS}
185: .endif
186:
187: .if defined(CSHLIBFLAGS) && !empty(CSHLIBFLAGS)
188: MKSHLIBOBJS= yes
189: .else
190: MKSHLIBOBJS= no
191: .endif
192:
1.123 jonathan 193: # Platform-independent linker flags for ELF shared libraries
1.182 mrg 194: SHLIB_SOVERSION= ${SHLIB_MAJOR}
1.282 lukem 195: SHLIB_SHFLAGS= -Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
1.272 christos 196: SHLIB_SHFLAGS+= -Wl,--warn-shared-textrel
1.301 mrg 197: SHLIB_LDSTARTFILE?= ${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}
198: SHLIB_LDENDFILE?= ${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o
1.86 jonathan 199:
1.82 mikel 200: CFLAGS+= ${COPTS}
1.267 mrg 201: OBJCFLAGS+= ${OBJCOPTS}
1.257 simonb 202: AFLAGS+= ${COPTS}
1.179 dmcmahil 203: FFLAGS+= ${FOPTS}
1.1 cgd 204:
1.305 darran 205: .if defined(CTFCONVERT)
206: .if defined(CFLAGS) && !empty(CFLAGS:M*-g*)
207: CTFFLAGS+= -g
208: .endif
209: .endif
210:
1.1 cgd 211: .c.o:
1.238 lukem 212: ${_MKTARGET_COMPILE}
1.263 dsl 213: ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 214: .if defined(CTFCONVERT)
215: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
216: .endif
1.270 martin 217: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263 dsl 218: ${OBJCOPY} -x ${.TARGET}
1.153 christos 219: .endif
1.1 cgd 220:
221: .c.po:
1.238 lukem 222: ${_MKTARGET_COMPILE}
1.263 dsl 223: ${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
1.305 darran 224: .if defined(CTFCONVERT)
225: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
226: .endif
1.270 martin 227: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263 dsl 228: ${OBJCOPY} -X ${.TARGET}
1.153 christos 229: .endif
1.17 mycroft 230:
1.266 christos 231: .c.go:
232: ${_MKTARGET_COMPILE}
233: ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
234:
1.304 njoly 235: .c.pico:
1.238 lukem 236: ${_MKTARGET_COMPILE}
1.263 dsl 237: ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
1.270 martin 238: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263 dsl 239: ${OBJCOPY} -x ${.TARGET}
1.153 christos 240: .endif
1.27 pk 241:
1.223 lukem 242: .cc.o .cpp.o .cxx.o .C.o:
1.238 lukem 243: ${_MKTARGET_COMPILE}
1.263 dsl 244: ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.270 martin 245: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263 dsl 246: ${OBJCOPY} -x ${.TARGET}
1.153 christos 247: .endif
1.17 mycroft 248:
1.266 christos 249: .cc.po .cpp.po .cxx.po .C.po:
1.238 lukem 250: ${_MKTARGET_COMPILE}
1.263 dsl 251: ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
1.270 martin 252: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263 dsl 253: ${OBJCOPY} -X ${.TARGET}
1.153 christos 254: .endif
1.28 cgd 255:
1.266 christos 256: .cc.go .cpp.go .cxx.go .C.go:
257: ${_MKTARGET_COMPILE}
258: ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
259:
1.304 njoly 260: .cc.pico .cpp.pico .cxx.pico .C.pico:
1.238 lukem 261: ${_MKTARGET_COMPILE}
1.263 dsl 262: ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
1.270 martin 263: .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
1.263 dsl 264: ${OBJCOPY} -x ${.TARGET}
1.153 christos 265: .endif
1.118 lukem 266:
1.179 dmcmahil 267: .f.o:
1.238 lukem 268: ${_MKTARGET_COMPILE}
1.263 dsl 269: ${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
1.305 darran 270: .if defined(CTFCONVERT)
271: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
272: .endif
1.263 dsl 273: .if !defined(FOPTS) || empty(FOPTS:M*-g*)
274: ${OBJCOPY} -x ${.TARGET}
1.179 dmcmahil 275: .endif
276:
277: .f.po:
1.238 lukem 278: ${_MKTARGET_COMPILE}
1.263 dsl 279: ${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
1.305 darran 280: .if defined(CTFCONVERT)
281: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
282: .endif
1.263 dsl 283: .if !defined(FOPTS) || empty(FOPTS:M*-g*)
284: ${OBJCOPY} -X ${.TARGET}
1.179 dmcmahil 285: .endif
286:
1.266 christos 287: .f.go:
288: ${_MKTARGET_COMPILE}
289: ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
290:
1.304 njoly 291: .f.pico:
1.238 lukem 292: ${_MKTARGET_COMPILE}
1.263 dsl 293: ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
294: .if !defined(FOPTS) || empty(FOPTS:M*-g*)
295: ${OBJCOPY} -x ${.TARGET}
1.179 dmcmahil 296: .endif
297:
298: .f.ln:
1.238 lukem 299: ${_MKTARGET_COMPILE}
1.217 wiz 300: @echo Skipping lint for Fortran libraries.
1.179 dmcmahil 301:
1.118 lukem 302: .m.o:
1.238 lukem 303: ${_MKTARGET_COMPILE}
1.267 mrg 304: ${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 305: .if defined(CTFCONVERT)
306: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
307: .endif
1.263 dsl 308: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
309: ${OBJCOPY} -x ${.TARGET}
1.153 christos 310: .endif
1.118 lukem 311:
312: .m.po:
1.238 lukem 313: ${_MKTARGET_COMPILE}
1.267 mrg 314: ${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 315: .if defined(CTFCONVERT)
316: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
317: .endif
1.263 dsl 318: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
319: ${OBJCOPY} -X ${.TARGET}
1.153 christos 320: .endif
1.118 lukem 321:
1.266 christos 322: .m.go:
323: ${_MKTARGET_COMPILE}
1.267 mrg 324: ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.266 christos 325: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
326: ${OBJCOPY} -X ${.TARGET}
327: .endif
328:
1.304 njoly 329: .m.pico:
1.238 lukem 330: ${_MKTARGET_COMPILE}
1.267 mrg 331: ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.263 dsl 332: .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
333: ${OBJCOPY} -x ${.TARGET}
1.153 christos 334: .endif
1.1 cgd 335:
1.251 lukem 336: .s.o:
1.238 lukem 337: ${_MKTARGET_COMPILE}
1.263 dsl 338: ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 339: .if defined(CTFCONVERT)
340: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
341: .endif
1.263 dsl 342: ${OBJCOPY} -x ${.TARGET}
1.1 cgd 343:
1.251 lukem 344: .S.o:
345: ${_MKTARGET_COMPILE}
1.263 dsl 346: ${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 347: .if defined(CTFCONVERT)
348: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
349: .endif
1.263 dsl 350: ${OBJCOPY} -x ${.TARGET}
1.251 lukem 351:
352: .s.po:
353: ${_MKTARGET_COMPILE}
1.263 dsl 354: ${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 355: .if defined(CTFCONVERT)
356: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
357: .endif
1.263 dsl 358: ${OBJCOPY} -X ${.TARGET}
1.251 lukem 359:
360: .S.po:
1.238 lukem 361: ${_MKTARGET_COMPILE}
1.263 dsl 362: ${COMPILE.S} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
1.305 darran 363: .if defined(CTFCONVERT)
364: ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
365: .endif
1.263 dsl 366: ${OBJCOPY} -X ${.TARGET}
1.1 cgd 367:
1.266 christos 368: .s.go:
369: ${_MKTARGET_COMPILE}
370: ${COMPILE.s} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
371:
372: .S.go:
373: ${_MKTARGET_COMPILE}
374: ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
375:
1.304 njoly 376: .s.pico:
1.251 lukem 377: ${_MKTARGET_COMPILE}
1.263 dsl 378: ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
379: ${OBJCOPY} -x ${.TARGET}
1.251 lukem 380:
1.304 njoly 381: .S.pico:
1.238 lukem 382: ${_MKTARGET_COMPILE}
1.263 dsl 383: ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
384: ${OBJCOPY} -x ${.TARGET}
1.27 pk 385:
1.252 lukem 386: .if defined(LIB) # {
1.234 lukem 387: .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
388: || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
1.130 tv 389: _LIBS=lib${LIB}.a
390: .else
391: _LIBS=
392: .endif
1.58 cgd 393:
1.167 matt 394: OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
1.158 christos 395:
1.255 thorpej 396: STOBJS+=${OBJS}
397:
1.280 lukem 398: LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
399:
1.281 lukem 400: .if ${LIBISPRIVATE} != "no"
1.252 lukem 401: # No installation is required
402: libinstall::
1.306 lukem 403: .endif
1.252 lukem 404:
1.268 lukem 405: .if ${MKDEBUGLIB} != "no"
1.266 christos 406: _LIBS+=lib${LIB}_g.a
407: GOBJS+=${OBJS:.o=.go}
408: DEBUGFLAGS?=-DDEBUG
409: .endif
410:
1.149 lukem 411: .if ${MKPROFILE} != "no"
1.130 tv 412: _LIBS+=lib${LIB}_p.a
1.167 matt 413: POBJS+=${OBJS:.o=.po}
1.262 christos 414: PROFFLAGS?=-DGPROF -DPROF
1.1 cgd 415: .endif
416:
1.252 lukem 417: .if ${MKPIC} != "no" # {
1.160 simonb 418: .if ${MKPICLIB} == "no"
1.205 yamt 419: .if ${MKSHLIBOBJS} != "no"
420: # make _pic.a, which isn't really pic,
421: # since it's needed for making shared lib.
422: # but don't install it.
423: SOLIB=lib${LIB}_pic.a
1.304 njoly 424: SOBJS+=${OBJS:.o=.pico}
1.205 yamt 425: .else
1.160 simonb 426: SOLIB=lib${LIB}.a
1.205 yamt 427: .endif
1.160 simonb 428: .else
429: SOLIB=lib${LIB}_pic.a
430: _LIBS+=${SOLIB}
1.304 njoly 431: SOBJS+=${OBJS:.o=.pico}
1.160 simonb 432: .endif
1.171 christos 433: .if defined(SHLIB_FULLVERSION)
1.307 lukem 434: _LIB.so:=lib${LIB}.so.${SHLIB_FULLVERSION}
1.308 mrg 435: .if ${MKDEBUG} != "no"
1.307 lukem 436: _LIB.debug:=${_LIB.so}.debug
437: .endif
1.171 christos 438: _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
1.27 pk 439: .endif
1.252 lukem 440: .endif # }
1.27 pk 441:
1.279 lukem 442: .if ${MKLINT} != "no" && !empty(LOBJS)
1.58 cgd 443: _LIBS+=llib-l${LIB}.ln
1.215 christos 444: .endif
1.27 pk 445:
1.234 lukem 446: ALLOBJS=
447: .if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
448: || ${MKLINKLIB} != "no") && ${MKSTATICLIB} != "no"
1.255 thorpej 449: ALLOBJS+=${STOBJS}
1.179 dmcmahil 450: .endif
1.234 lukem 451: ALLOBJS+=${POBJS} ${SOBJS}
1.279 lukem 452: .if ${MKLINT} != "no" && !empty(LOBJS)
1.179 dmcmahil 453: ALLOBJS+=${LOBJS}
1.216 christos 454: .endif
1.252 lukem 455: .else # !defined(LIB) # } {
1.216 christos 456: LOBJS=
457: SOBJS=
1.252 lukem 458: .endif # !defined(LIB) # }
1.186 tv 459:
1.254 lukem 460: _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
1.253 christos 461:
462: .NOPATH: ${ALLOBJS} ${_LIBS} ${_YLSRCS}
1.158 christos 463:
1.307 lukem 464: realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.debug}
1.1 cgd 465:
1.296 perry 466: MKARZERO?=no
467:
468: .if ${MKARZERO} == "yes"
469: _ARFL=crsD
1.297 perry 470: _ARRANFL=sD
1.296 perry 471: _INSTRANLIB=
472: .else
473: _ARFL=crs
1.297 perry 474: _ARRANFL=s
1.296 perry 475: _INSTRANLIB=${empty(PRESERVE):?-a "${RANLIB} -t":}
476: .endif
477:
1.293 pooka 478: # If you change this, please consider reflecting the change in
479: # the override in sys/rump/Makefile.rump.
1.243 rtr 480: .if !target(__archivebuild)
1.90 christos 481: __archivebuild: .USE
1.238 lukem 482: ${_MKTARGET_BUILD}
1.236 lukem 483: rm -f ${.TARGET}
1.296 perry 484: ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.243 rtr 485: .endif
1.89 christos 486:
1.243 rtr 487: .if !target(__archiveinstall)
1.89 christos 488: __archiveinstall: .USE
1.238 lukem 489: ${_MKTARGET_INSTALL}
1.198 lukem 490: ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.296 perry 491: ${_INSTRANLIB} ${.ALLSRC} ${.TARGET}
1.243 rtr 492: .endif
1.89 christos 493:
1.197 mycroft 494: __archivesymlinkpic: .USE
1.238 lukem 495: ${_MKTARGET_INSTALL}
1.264 jwise 496: ${INSTALL_SYMLINK} ${.ALLSRC} ${.TARGET}
1.197 mycroft 497:
1.253 christos 498: DPSRCS+= ${_YLSRCS}
499: CLEANFILES+= ${_YLSRCS}
1.230 lukem 500:
1.266 christos 501: ${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
1.103 mycroft 502:
1.255 thorpej 503: lib${LIB}.a:: ${STOBJS} __archivebuild
1.1 cgd 504:
1.89 christos 505: lib${LIB}_p.a:: ${POBJS} __archivebuild
1.1 cgd 506:
1.89 christos 507: lib${LIB}_pic.a:: ${SOBJS} __archivebuild
1.27 pk 508:
1.266 christos 509: lib${LIB}_g.a:: ${GOBJS} __archivebuild
510:
1.235 lukem 511:
512: _LIBLDOPTS=
513: .if ${SHLIBDIR} != "/usr/lib"
1.314 joerg 514: _LIBLDOPTS+= -Wl,-rpath,${SHLIBDIR} \
1.313 joerg 515: -L=${SHLIBDIR}
1.235 lukem 516: .elif ${SHLIBINSTALLDIR} != "/usr/lib"
1.314 joerg 517: _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
1.313 joerg 518: -L=${SHLIBINSTALLDIR}
1.235 lukem 519: .endif
520:
1.277 christos 521: # gcc -shared now adds -lc automatically. For libraries other than libc and
522: # libgcc* we add as a dependency the installed shared libc. For libc and
523: # libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that
524: # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not
525: # to add standard libraries, not the linker.
1.276 christos 526: .if !defined(LIB)
1.312 matt 527: .if !empty(LIBC_SO)
1.274 christos 528: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.312 matt 529: .endif
1.276 christos 530: .else
1.278 simonb 531: .if ${LIB} != "c" && ${LIB:Mgcc*} == ""
1.312 matt 532: .if !empty(LIBC_SO)
1.276 christos 533: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.312 matt 534: .endif
1.277 christos 535: .else
1.278 simonb 536: LDLIBC ?= -nodefaultlibs
537: .if ${LIB} == "c"
538: LDADD+= -lgcc_pic
539: .endif
1.276 christos 540: .endif
1.274 christos 541: .endif
542:
1.291 mrg 543: .if ${LIBISCXX} != "no"
544: LIBCC:= ${CXX}
545: .else
546: LIBCC:= ${CC}
547: .endif
548:
1.300 uebayasi 549: _LDADD.lib${LIB}= ${LDADD} ${LDADD.lib${LIB}}
550: _LDFLAGS.lib${LIB}= ${LDFLAGS} ${LDFLAGS.lib${LIB}}
551:
1.274 christos 552: lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
1.88 cgd 553: ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.238 lukem 554: ${_MKTARGET_BUILD}
1.236 lukem 555: rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
1.300 uebayasi 556: ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${_LDFLAGS.lib${LIB}} \
1.277 christos 557: -o ${.TARGET} ${_LIBLDOPTS} \
1.300 uebayasi 558: -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${_LDADD.lib${LIB}}
1.196 lukem 559: # We don't use INSTALL_SYMLINK here because this is just
560: # happening inside the build directory/objdir. XXX Why does
561: # this spend so much effort on libraries that aren't live??? XXX
1.284 lukem 562: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
563: "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.241 matt 564: ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
1.177 mycroft 565: mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
1.283 lukem 566: .endif
1.241 matt 567: ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
1.177 mycroft 568: mv -f lib${LIB}.so.tmp lib${LIB}.so
1.286 joerg 569: .if ${MKSTRIPIDENT} != "no"
570: ${OBJCOPY} -R .ident ${.TARGET}
571: .endif
1.35 pk 572:
1.307 lukem 573: .if defined(_LIB.debug)
574: ${_LIB.debug}: ${_LIB.so}
575: ${_MKTARGET_CREATE}
1.309 lukem 576: ( ${OBJCOPY} --only-keep-debug ${_LIB.so} ${_LIB.debug} \
577: && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
578: --add-gnu-debuglink=${_LIB.debug} ${_LIB.so} \
579: ) || (rm -f ${_LIB.debug}; false)
1.307 lukem 580: .endif
581:
1.252 lukem 582: .if !empty(LOBJS) # {
1.103 mycroft 583: LLIBS?= -lc
1.58 cgd 584: llib-l${LIB}.ln: ${LOBJS}
1.238 lukem 585: ${_MKTARGET_COMPILE}
1.236 lukem 586: rm -f llib-l${LIB}.ln
1.206 thorpej 587: .if defined(DESTDIR)
1.228 lukem 588: ${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
1.206 thorpej 589: .else
1.228 lukem 590: ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
1.206 thorpej 591: .endif
1.252 lukem 592: .endif # }
1.1 cgd 593:
1.280 lukem 594: lint: ${LOBJS}
595: .if defined(LOBJS) && !empty(LOBJS)
596: ${LINT} ${LINTFLAGS} ${LOBJS}
597: .endif
598:
1.246 lukem 599: cleanlib: .PHONY
1.48 mycroft 600: rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
1.255 thorpej 601: rm -f lib${LIB}.a ${STOBJS}
1.59 cgd 602: rm -f lib${LIB}_p.a ${POBJS}
1.266 christos 603: rm -f lib${LIB}_g.a ${GOBJS}
1.307 lukem 604: rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${_LIB.debug} ${SOBJS}
1.266 christos 605: rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}
1.59 cgd 606: rm -f llib-l${LIB}.ln ${LOBJS}
1.1 cgd 607:
1.252 lukem 608:
609: .if !target(libinstall) # {
1.148 lukem 610: # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
1.139 tv 611: libinstall::
612:
1.234 lukem 613: .if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no"
1.89 christos 614: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.168 mycroft 615: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.197 mycroft 616:
1.269 dbj 617: .if ${MKUPDATE} == "no"
1.197 mycroft 618: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
619: ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
1.89 christos 620: .endif
1.197 mycroft 621: ${DESTDIR}${LIBDIR}/lib${LIB}.a! lib${LIB}.a __archiveinstall
622: .else
1.157 fredb 623: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
1.89 christos 624: ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
625: .endif
626: ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
1.130 tv 627: .endif
1.197 mycroft 628: .endif
1.89 christos 629:
1.149 lukem 630: .if ${MKPROFILE} != "no"
1.89 christos 631: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.168 mycroft 632: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.197 mycroft 633:
1.269 dbj 634: .if ${MKUPDATE} == "no"
1.197 mycroft 635: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
636: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
1.32 pk 637: .endif
1.197 mycroft 638: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! lib${LIB}_p.a __archiveinstall
639: .else
1.157 fredb 640: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
1.89 christos 641: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
642: .endif
643: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
644: .endif
1.197 mycroft 645: .endif
1.89 christos 646:
1.268 lukem 647: .if ${MKDEBUGLIB} != "no"
1.266 christos 648: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
649: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
650:
1.269 dbj 651: .if ${MKUPDATE} == "no"
1.266 christos 652: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
653: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! .MADE
654: .endif
655: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! lib${LIB}_g.a __archiveinstall
656: .else
657: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
658: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: .MADE
659: .endif
660: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: lib${LIB}_g.a __archiveinstall
661: .endif
662: .endif
663:
1.149 lukem 664: .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
1.168 mycroft 665: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.160 simonb 666: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.197 mycroft 667:
1.269 dbj 668: .if ${MKUPDATE} == "no"
1.197 mycroft 669: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
670: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
1.89 christos 671: .endif
1.197 mycroft 672: .if ${MKPICLIB} == "no"
673: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}.a __archivesymlinkpic
674: .else
675: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}_pic.a __archiveinstall
676: .endif
677: .else
1.157 fredb 678: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
1.89 christos 679: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
1.33 pk 680: .endif
1.160 simonb 681: .if ${MKPICLIB} == "no"
1.197 mycroft 682: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}.a __archivesymlinkpic
1.160 simonb 683: .else
1.89 christos 684: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
1.160 simonb 685: .endif
1.89 christos 686: .endif
1.197 mycroft 687: .endif
1.89 christos 688:
1.171 christos 689: .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
1.282 lukem 690: _LIB_SO_TGT= ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
691: _LIB_SO_TGTLIBDIR= ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
692:
693: libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
694: .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
1.197 mycroft 695:
1.269 dbj 696: .if ${MKUPDATE} == "no"
1.197 mycroft 697: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282 lukem 698: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
1.89 christos 699: .endif
1.282 lukem 700: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
1.197 mycroft 701: .else
1.171 christos 702: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282 lukem 703: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
1.89 christos 704: .endif
1.282 lukem 705: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
1.197 mycroft 706: .endif
1.238 lukem 707: ${_MKTARGET_INSTALL}
1.188 tv 708: ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264 jwise 709: ${.ALLSRC} ${.TARGET}
1.195 lukem 710: .if ${_LIBSODIR} != ${LIBDIR}
1.282 lukem 711: ${INSTALL_SYMLINK} -l r \
712: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
713: ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
1.195 lukem 714: .endif
1.284 lukem 715: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
716: "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.264 jwise 717: ${INSTALL_SYMLINK} \
1.284 lukem 718: ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282 lukem 719: ${_LIB_SO_TGT}.${SHLIB_MAJOR}
1.195 lukem 720: .if ${_LIBSODIR} != ${LIBDIR}
1.282 lukem 721: ${INSTALL_SYMLINK} -l r \
722: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
723: ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
1.195 lukem 724: .endif
1.284 lukem 725: .endif
1.148 lukem 726: .if ${MKLINKLIB} != "no"
1.264 jwise 727: ${INSTALL_SYMLINK} \
1.284 lukem 728: ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282 lukem 729: ${_LIB_SO_TGT}
1.195 lukem 730: .if ${_LIBSODIR} != ${LIBDIR}
1.282 lukem 731: ${INSTALL_SYMLINK} -l r \
732: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
733: ${_LIB_SO_TGTLIBDIR}
1.195 lukem 734: .endif
1.83 cgd 735: .endif
1.12 cgd 736: .endif
1.89 christos 737:
1.307 lukem 738: .if defined(_LIB.debug)
739: libinstall:: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}
740: .PRECIOUS: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}
741:
742: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}: ${_LIB.debug}
743: ${_MKTARGET_INSTALL}
744: ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
745: ${.ALLSRC} ${.TARGET}
746: .endif
747:
1.279 lukem 748: .if ${MKLINT} != "no" && !empty(LOBJS)
1.89 christos 749: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.168 mycroft 750: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.197 mycroft 751:
1.269 dbj 752: .if ${MKUPDATE} == "no"
1.197 mycroft 753: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
754: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
1.89 christos 755: .endif
1.197 mycroft 756: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! llib-l${LIB}.ln
757: .else
1.157 fredb 758: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
1.89 christos 759: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
760: .endif
1.95 mycroft 761: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.197 mycroft 762: .endif
1.238 lukem 763: ${_MKTARGET_INSTALL}
1.188 tv 764: ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264 jwise 765: ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
1.58 cgd 766: .endif
1.252 lukem 767: .endif # !target(libinstall) # }
1.1 cgd 768:
1.188 tv 769: ##### Pull in related .mk logic
1.298 apb 770: LINKSOWN?= ${LIBOWN}
771: LINKSGRP?= ${LIBGRP}
772: LINKSMODE?= ${LIBMODE}
1.1 cgd 773: .include <bsd.man.mk>
1.57 jtc 774: .include <bsd.nls.mk>
1.91 christos 775: .include <bsd.files.mk>
1.89 christos 776: .include <bsd.inc.mk>
1.109 cjs 777: .include <bsd.links.mk>
1.24 mycroft 778: .include <bsd.dep.mk>
1.315 ! joerg 779: .include <bsd.clang-analyze.mk>
1.117 mycroft 780:
1.188 tv 781: ${TARGETS}: # ensure existence
CVSweb <webmaster@jp.NetBSD.org>