Make the libfoo.so.X.Y.debug files actually contain debug symbols if MKDEBUG.

This commit is contained in:
christos 2013-01-22 20:43:17 +00:00
parent 5e9a2dddf3
commit 1d92830f7c

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.lib.mk,v 1.325 2012/11/13 22:30:38 pooka Exp $
# $NetBSD: bsd.lib.mk,v 1.326 2013/01/22 20:43:17 christos Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@ -47,6 +47,12 @@ CFLAGS+= ${PIE_CFLAGS}
AFLAGS+= ${PIE_AFLAGS}
.endif
.if defined(MKDEBUG) && (${MKDEBUG} != "no")
# We only add -g to the shared library objects
# because we don't currently split .a archives.
CSHLIBFLAGS+= -g
.endif
##### Libraries that this may depend upon.
.if defined(LIBDPLIBS) && ${MKPIC} != "no" # {
.for _lib _dir in ${LIBDPLIBS}
@ -238,7 +244,7 @@ CTFFLAGS+= -g
.c.pico:
${_MKTARGET_COMPILE}
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
.if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
.if !defined(CSHLIBFLAGS) || empty(CSHLIBFLAGS:M*-g*)
${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
.endif
@ -263,7 +269,7 @@ CTFFLAGS+= -g
.cc.pico .cpp.pico .cxx.pico .C.pico:
${_MKTARGET_COMPILE}
${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
.if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
.if !defined(CSHLIBFLAGS) || empty(CSHLIBFLAGS:M*-g*)
${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
.endif