lib.mk (321653) | lib.mk (331246) |
---|---|
1# $Id: lib.mk,v 1.62 2017/06/11 03:24:04 sjg Exp $ | 1# $Id: lib.mk,v 1.68 2018/01/26 20:08:16 sjg Exp $ |
2 3.if !target(__${.PARSEFILE}__) 4__${.PARSEFILE}__: 5 6.include <init.mk> 7 8.if ${OBJECT_FMT} == "ELF" 9NEED_SOLINKS?= yes --- 22 unchanged lines hidden (view full) --- 32# .po is used for profiling object files. 33# ${PICO} is used for PIC object files. 34PICO?= .pico 35.SUFFIXES: .out .a .ln ${PICO} .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h 36.SUFFIXES: .sh .m4 .m 37 38CFLAGS+= ${COPTS} 39 | 2 3.if !target(__${.PARSEFILE}__) 4__${.PARSEFILE}__: 5 6.include <init.mk> 7 8.if ${OBJECT_FMT} == "ELF" 9NEED_SOLINKS?= yes --- 22 unchanged lines hidden (view full) --- 32# .po is used for profiling object files. 33# ${PICO} is used for PIC object files. 34PICO?= .pico 35.SUFFIXES: .out .a .ln ${PICO} .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h 36.SUFFIXES: .sh .m4 .m 37 38CFLAGS+= ${COPTS} 39 |
40META_NOECHO?= echo 41 |
|
40# Originally derrived from NetBSD-1.6 41 42# Set PICFLAGS to cc flags for producing position-independent code, 43# if not already set. Includes -DPIC, if required. 44 45# Data-driven table using make variables to control how shared libraries 46# are built for different platforms and object formats. 47# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk> --- 317 unchanged lines hidden (view full) --- 365.-include <libnames.mk> 366.if ${MK_DPADD_MK} == "yes" 367# lots of cool magic, but might not suit everyone. 368.include <dpadd.mk> 369.endif 370 371.if empty(LIB) 372_LIBS= | 42# Originally derrived from NetBSD-1.6 43 44# Set PICFLAGS to cc flags for producing position-independent code, 45# if not already set. Includes -DPIC, if required. 46 47# Data-driven table using make variables to control how shared libraries 48# are built for different platforms and object formats. 49# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk> --- 317 unchanged lines hidden (view full) --- 367.-include <libnames.mk> 368.if ${MK_DPADD_MK} == "yes" 369# lots of cool magic, but might not suit everyone. 370.include <dpadd.mk> 371.endif 372 373.if empty(LIB) 374_LIBS= |
375.elif ${MK_LDORDER_MK} != "no" 376# Record any libs that we need to be linked with 377_LIBS+= ${libLDORDER_INC} 378 379.include <ldorder.mk> |
|
373.endif 374 375.if !defined(_SKIP_BUILD) 376realbuild: ${_LIBS} 377.endif 378 379all: _SUBDIRUSE 380 --- 121 unchanged lines hidden (view full) --- 502.include <links.mk> 503 504.if !target(libinstall) && !empty(LIB) 505realinstall: libinstall 506libinstall: 507 [ -d ${DESTDIR}/${LIBDIR} ] || \ 508 ${INSTALL} -d ${LIB_INSTALL_OWN} -m 775 ${DESTDIR}${LIBDIR} 509.if ${MK_ARCHIVE} != "no" | 380.endif 381 382.if !defined(_SKIP_BUILD) 383realbuild: ${_LIBS} 384.endif 385 386all: _SUBDIRUSE 387 --- 121 unchanged lines hidden (view full) --- 509.include <links.mk> 510 511.if !target(libinstall) && !empty(LIB) 512realinstall: libinstall 513libinstall: 514 [ -d ${DESTDIR}/${LIBDIR} ] || \ 515 ${INSTALL} -d ${LIB_INSTALL_OWN} -m 775 ${DESTDIR}${LIBDIR} 516.if ${MK_ARCHIVE} != "no" |
510 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 600 lib${LIB}.a \ | 517 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 lib${LIB}.a \ |
511 ${DESTDIR}${LIBDIR} 512 ${RANLIB} ${DESTDIR}${LIBDIR}/lib${LIB}.a 513 chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}.a 514.endif 515.if ${MK_PROFILE} != "no" | 518 ${DESTDIR}${LIBDIR} 519 ${RANLIB} ${DESTDIR}${LIBDIR}/lib${LIB}.a 520 chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}.a 521.endif 522.if ${MK_PROFILE} != "no" |
516 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 600 \ | 523 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 \ |
517 lib${LIB}_p.a ${DESTDIR}${LIBDIR} 518 ${RANLIB} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a 519 chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a 520.endif | 524 lib${LIB}_p.a ${DESTDIR}${LIBDIR} 525 ${RANLIB} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a 526 chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a 527.endif |
528.if ${MK_LDORDER_MK} != "no" 529 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 \ 530 lib${LIB}.ldorder.inc ${DESTDIR}${LIBDIR} 531.endif |
|
521.if ${MK_PIC} != "no" 522.if ${MK_PICLIB} != "no" | 532.if ${MK_PIC} != "no" 533.if ${MK_PICLIB} != "no" |
523 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 600 \ | 534 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 \ |
524 lib${LIB}_pic.a ${DESTDIR}${LIBDIR} 525 ${RANLIB} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a 526 chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a 527.endif 528.if !empty(SHLIB_MAJOR) 529 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m ${LIBMODE} \ 530 lib${LIB}.${LD_so} ${DESTDIR}${LIBDIR} 531.if !empty(SHLIB_LINKS) --- 65 unchanged lines hidden --- | 535 lib${LIB}_pic.a ${DESTDIR}${LIBDIR} 536 ${RANLIB} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a 537 chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a 538.endif 539.if !empty(SHLIB_MAJOR) 540 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m ${LIBMODE} \ 541 lib${LIB}.${LD_so} ${DESTDIR}${LIBDIR} 542.if !empty(SHLIB_LINKS) --- 65 unchanged lines hidden --- |