Annotation of src/share/mk/bsd.lib.mk, Revision 1.313
1.313 ! joerg 1: # $NetBSD: bsd.lib.mk,v 1.312 2011/02/10 21:55:33 matt 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.313 ! joerg 514: _LIBLDOPTS+= -Wl,-rpath-link,=${SHLIBDIR} \
! 515: -Wl,-rpath,=${SHLIBDIR} \
! 516: -L=${SHLIBDIR}
1.235 lukem 517: .elif ${SHLIBINSTALLDIR} != "/usr/lib"
1.313 ! joerg 518: _LIBLDOPTS+= -Wl,-rpath-link,=${SHLIBINSTALLDIR} \
! 519: -L=${SHLIBINSTALLDIR}
1.235 lukem 520: .endif
521:
1.277 christos 522: # gcc -shared now adds -lc automatically. For libraries other than libc and
523: # libgcc* we add as a dependency the installed shared libc. For libc and
524: # libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that
525: # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not
526: # to add standard libraries, not the linker.
1.276 christos 527: .if !defined(LIB)
1.312 matt 528: .if !empty(LIBC_SO)
1.274 christos 529: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.312 matt 530: .endif
1.276 christos 531: .else
1.278 simonb 532: .if ${LIB} != "c" && ${LIB:Mgcc*} == ""
1.312 matt 533: .if !empty(LIBC_SO)
1.276 christos 534: DPLIBC ?= ${DESTDIR}${LIBC_SO}
1.312 matt 535: .endif
1.277 christos 536: .else
1.278 simonb 537: LDLIBC ?= -nodefaultlibs
538: .if ${LIB} == "c"
539: LDADD+= -lgcc_pic
540: .endif
1.276 christos 541: .endif
1.274 christos 542: .endif
543:
1.291 mrg 544: .if ${LIBISCXX} != "no"
545: LIBCC:= ${CXX}
546: .else
547: LIBCC:= ${CC}
548: .endif
549:
1.300 uebayasi 550: _LDADD.lib${LIB}= ${LDADD} ${LDADD.lib${LIB}}
551: _LDFLAGS.lib${LIB}= ${LDFLAGS} ${LDFLAGS.lib${LIB}}
552:
1.274 christos 553: lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \
1.88 cgd 554: ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
1.238 lukem 555: ${_MKTARGET_BUILD}
1.236 lukem 556: rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
1.300 uebayasi 557: ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${_LDFLAGS.lib${LIB}} \
1.277 christos 558: -o ${.TARGET} ${_LIBLDOPTS} \
1.300 uebayasi 559: -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${_LDADD.lib${LIB}}
1.196 lukem 560: # We don't use INSTALL_SYMLINK here because this is just
561: # happening inside the build directory/objdir. XXX Why does
562: # this spend so much effort on libraries that aren't live??? XXX
1.284 lukem 563: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
564: "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.241 matt 565: ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
1.177 mycroft 566: mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
1.283 lukem 567: .endif
1.241 matt 568: ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
1.177 mycroft 569: mv -f lib${LIB}.so.tmp lib${LIB}.so
1.286 joerg 570: .if ${MKSTRIPIDENT} != "no"
571: ${OBJCOPY} -R .ident ${.TARGET}
572: .endif
1.35 pk 573:
1.307 lukem 574: .if defined(_LIB.debug)
575: ${_LIB.debug}: ${_LIB.so}
576: ${_MKTARGET_CREATE}
1.309 lukem 577: ( ${OBJCOPY} --only-keep-debug ${_LIB.so} ${_LIB.debug} \
578: && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
579: --add-gnu-debuglink=${_LIB.debug} ${_LIB.so} \
580: ) || (rm -f ${_LIB.debug}; false)
1.307 lukem 581: .endif
582:
1.252 lukem 583: .if !empty(LOBJS) # {
1.103 mycroft 584: LLIBS?= -lc
1.58 cgd 585: llib-l${LIB}.ln: ${LOBJS}
1.238 lukem 586: ${_MKTARGET_COMPILE}
1.236 lukem 587: rm -f llib-l${LIB}.ln
1.206 thorpej 588: .if defined(DESTDIR)
1.228 lukem 589: ${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
1.206 thorpej 590: .else
1.228 lukem 591: ${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
1.206 thorpej 592: .endif
1.252 lukem 593: .endif # }
1.1 cgd 594:
1.280 lukem 595: lint: ${LOBJS}
596: .if defined(LOBJS) && !empty(LOBJS)
597: ${LINT} ${LINTFLAGS} ${LOBJS}
598: .endif
599:
1.246 lukem 600: cleanlib: .PHONY
1.48 mycroft 601: rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
1.255 thorpej 602: rm -f lib${LIB}.a ${STOBJS}
1.59 cgd 603: rm -f lib${LIB}_p.a ${POBJS}
1.266 christos 604: rm -f lib${LIB}_g.a ${GOBJS}
1.307 lukem 605: rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${_LIB.debug} ${SOBJS}
1.266 christos 606: rm -f ${STOBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp} ${GOBJS:=.tmp}
1.59 cgd 607: rm -f llib-l${LIB}.ln ${LOBJS}
1.1 cgd 608:
1.252 lukem 609:
610: .if !target(libinstall) # {
1.148 lukem 611: # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
1.139 tv 612: libinstall::
613:
1.234 lukem 614: .if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no"
1.89 christos 615: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.168 mycroft 616: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
1.197 mycroft 617:
1.269 dbj 618: .if ${MKUPDATE} == "no"
1.197 mycroft 619: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
620: ${DESTDIR}${LIBDIR}/lib${LIB}.a! .MADE
1.89 christos 621: .endif
1.197 mycroft 622: ${DESTDIR}${LIBDIR}/lib${LIB}.a! lib${LIB}.a __archiveinstall
623: .else
1.157 fredb 624: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
1.89 christos 625: ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
626: .endif
627: ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
1.130 tv 628: .endif
1.197 mycroft 629: .endif
1.89 christos 630:
1.149 lukem 631: .if ${MKPROFILE} != "no"
1.89 christos 632: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.168 mycroft 633: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
1.197 mycroft 634:
1.269 dbj 635: .if ${MKUPDATE} == "no"
1.197 mycroft 636: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
637: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! .MADE
1.32 pk 638: .endif
1.197 mycroft 639: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a! lib${LIB}_p.a __archiveinstall
640: .else
1.157 fredb 641: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
1.89 christos 642: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
643: .endif
644: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
645: .endif
1.197 mycroft 646: .endif
1.89 christos 647:
1.268 lukem 648: .if ${MKDEBUGLIB} != "no"
1.266 christos 649: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
650: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a
651:
1.269 dbj 652: .if ${MKUPDATE} == "no"
1.266 christos 653: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
654: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! .MADE
655: .endif
656: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a! lib${LIB}_g.a __archiveinstall
657: .else
658: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_g.a)
659: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: .MADE
660: .endif
661: ${DESTDIR}${LIBDIR}/lib${LIB}_g.a: lib${LIB}_g.a __archiveinstall
662: .endif
663: .endif
664:
1.149 lukem 665: .if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
1.168 mycroft 666: libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.160 simonb 667: .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
1.197 mycroft 668:
1.269 dbj 669: .if ${MKUPDATE} == "no"
1.197 mycroft 670: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
671: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! .MADE
1.89 christos 672: .endif
1.197 mycroft 673: .if ${MKPICLIB} == "no"
674: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}.a __archivesymlinkpic
675: .else
676: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a! lib${LIB}_pic.a __archiveinstall
677: .endif
678: .else
1.157 fredb 679: .if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
1.89 christos 680: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
1.33 pk 681: .endif
1.160 simonb 682: .if ${MKPICLIB} == "no"
1.197 mycroft 683: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}.a __archivesymlinkpic
1.160 simonb 684: .else
1.89 christos 685: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
1.160 simonb 686: .endif
1.89 christos 687: .endif
1.197 mycroft 688: .endif
1.89 christos 689:
1.171 christos 690: .if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
1.282 lukem 691: _LIB_SO_TGT= ${DESTDIR}${_LIBSODIR}/${_LIB_PREFIX}${LIB}.so
692: _LIB_SO_TGTLIBDIR= ${DESTDIR}${LIBDIR}/${_LIB_PREFIX}${LIB}.so
693:
694: libinstall:: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
695: .PRECIOUS: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}
1.197 mycroft 696:
1.269 dbj 697: .if ${MKUPDATE} == "no"
1.197 mycroft 698: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282 lukem 699: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! .MADE
1.89 christos 700: .endif
1.282 lukem 701: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}! lib${LIB}.so.${SHLIB_FULLVERSION}
1.197 mycroft 702: .else
1.171 christos 703: .if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
1.282 lukem 704: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: .MADE
1.89 christos 705: .endif
1.282 lukem 706: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
1.197 mycroft 707: .endif
1.238 lukem 708: ${_MKTARGET_INSTALL}
1.188 tv 709: ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264 jwise 710: ${.ALLSRC} ${.TARGET}
1.195 lukem 711: .if ${_LIBSODIR} != ${LIBDIR}
1.282 lukem 712: ${INSTALL_SYMLINK} -l r \
713: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
714: ${_LIB_SO_TGTLIBDIR}.${SHLIB_FULLVERSION}
1.195 lukem 715: .endif
1.284 lukem 716: .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
717: "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
1.264 jwise 718: ${INSTALL_SYMLINK} \
1.284 lukem 719: ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282 lukem 720: ${_LIB_SO_TGT}.${SHLIB_MAJOR}
1.195 lukem 721: .if ${_LIBSODIR} != ${LIBDIR}
1.282 lukem 722: ${INSTALL_SYMLINK} -l r \
723: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
724: ${_LIB_SO_TGTLIBDIR}.${SHLIB_MAJOR}
1.195 lukem 725: .endif
1.284 lukem 726: .endif
1.148 lukem 727: .if ${MKLINKLIB} != "no"
1.264 jwise 728: ${INSTALL_SYMLINK} \
1.284 lukem 729: ${_LIB_PREFIX}${LIB}.so.${SHLIB_FULLVERSION} \
1.282 lukem 730: ${_LIB_SO_TGT}
1.195 lukem 731: .if ${_LIBSODIR} != ${LIBDIR}
1.282 lukem 732: ${INSTALL_SYMLINK} -l r \
733: ${_LIB_SO_TGT}.${SHLIB_FULLVERSION} \
734: ${_LIB_SO_TGTLIBDIR}
1.195 lukem 735: .endif
1.83 cgd 736: .endif
1.12 cgd 737: .endif
1.89 christos 738:
1.307 lukem 739: .if defined(_LIB.debug)
740: libinstall:: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}
741: .PRECIOUS: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}
742:
743: ${DESTDIR}${DEBUGDIR}${LIBDIR}/${_LIB.debug}: ${_LIB.debug}
744: ${_MKTARGET_INSTALL}
745: ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
746: ${.ALLSRC} ${.TARGET}
747: .endif
748:
1.279 lukem 749: .if ${MKLINT} != "no" && !empty(LOBJS)
1.89 christos 750: libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.168 mycroft 751: .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
1.197 mycroft 752:
1.269 dbj 753: .if ${MKUPDATE} == "no"
1.197 mycroft 754: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
755: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! .MADE
1.89 christos 756: .endif
1.197 mycroft 757: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln! llib-l${LIB}.ln
758: .else
1.157 fredb 759: .if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
1.89 christos 760: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
761: .endif
1.95 mycroft 762: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
1.197 mycroft 763: .endif
1.238 lukem 764: ${_MKTARGET_INSTALL}
1.188 tv 765: ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
1.264 jwise 766: ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
1.58 cgd 767: .endif
1.252 lukem 768: .endif # !target(libinstall) # }
1.1 cgd 769:
1.188 tv 770: ##### Pull in related .mk logic
1.298 apb 771: LINKSOWN?= ${LIBOWN}
772: LINKSGRP?= ${LIBGRP}
773: LINKSMODE?= ${LIBMODE}
1.1 cgd 774: .include <bsd.man.mk>
1.57 jtc 775: .include <bsd.nls.mk>
1.91 christos 776: .include <bsd.files.mk>
1.89 christos 777: .include <bsd.inc.mk>
1.109 cjs 778: .include <bsd.links.mk>
1.24 mycroft 779: .include <bsd.dep.mk>
1.117 mycroft 780:
1.188 tv 781: ${TARGETS}: # ensure existence
CVSweb <webmaster@jp.NetBSD.org>