version 1.273, 2008/01/09 11:26:14 |
version 1.279, 2008/05/02 11:45:19 |
Line 372 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION} |
|
Line 372 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION} |
|
.endif # } |
.endif # } |
|
|
LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS) |
.if ${MKLINT} != "no" && !empty(LOBJS) |
_LIBS+=llib-l${LIB}.ln |
_LIBS+=llib-l${LIB}.ln |
.endif |
.endif |
|
|
|
|
ALLOBJS+=${STOBJS} |
ALLOBJS+=${STOBJS} |
.endif |
.endif |
ALLOBJS+=${POBJS} ${SOBJS} |
ALLOBJS+=${POBJS} ${SOBJS} |
.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS) |
.if ${MKLINT} != "no" && !empty(LOBJS) |
ALLOBJS+=${LOBJS} |
ALLOBJS+=${LOBJS} |
.endif |
.endif |
.else # !defined(LIB) # } { |
.else # !defined(LIB) # } { |
Line 441 _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}$ |
|
Line 441 _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}$ |
|
-L${DESTDIR}${SHLIBINSTALLDIR} |
-L${DESTDIR}${SHLIBINSTALLDIR} |
.endif |
.endif |
|
|
lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ |
# gcc -shared now adds -lc automatically. For libraries other than libc and |
|
# libgcc* we add as a dependency the installed shared libc. For libc and |
|
# libgcc* we avoid adding libc as a dependency by using -nostdlib. Note that |
|
# -Xl,-nostdlib is not enough because we want to tell the compiler-driver not |
|
# to add standard libraries, not the linker. |
|
.if !defined(LIB) |
|
DPLIBC ?= ${DESTDIR}${LIBC_SO} |
|
.else |
|
.if ${LIB} != "c" && ${LIB:Mgcc*} == "" |
|
DPLIBC ?= ${DESTDIR}${LIBC_SO} |
|
.else |
|
LDLIBC ?= -nodefaultlibs |
|
.if ${LIB} == "c" |
|
LDADD+= -lgcc_pic |
|
.endif |
|
.endif |
|
.endif |
|
|
|
lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} ${DPLIBC} \ |
${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} |
${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} |
${_MKTARGET_BUILD} |
${_MKTARGET_BUILD} |
rm -f lib${LIB}.so.${SHLIB_FULLVERSION} |
rm -f lib${LIB}.so.${SHLIB_FULLVERSION} |
.if defined(DESTDIR) |
.if defined(DESTDIR) |
${CC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \ |
${CC} ${LDLIBC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \ |
${_LIBLDOPTS} \ |
${_LIBLDOPTS} \ |
-Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \ |
-Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \ |
-Wl,--whole-archive ${SOLIB} \ |
-Wl,--whole-archive ${SOLIB} \ |
-Wl,--no-whole-archive ${LDADD} \ |
-Wl,--no-whole-archive ${LDADD} \ |
-L${_GCC_LIBGCCDIR} |
-L${_GCC_LIBGCCDIR} |
.else |
.else |
${CC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \ |
${CC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} \ |
${_LIBLDOPTS} \ |
-o ${.TARGET} ${_LIBLDOPTS} \ |
-Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD} |
-Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD} |
.endif |
.endif |
.if ${OBJECT_FMT} == "ELF" |
.if ${OBJECT_FMT} == "ELF" |
Line 617 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SH |
|
Line 635 ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SH |
|
.endif |
.endif |
.endif |
.endif |
|
|
.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS) |
.if ${MKLINT} != "no" && !empty(LOBJS) |
libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
|
|