From 844deeb08b27dc0b02ff29ddce7d093f40e64070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Tue, 3 May 2011 23:41:55 +0200 Subject: [PATCH] Split debugging symbols in separate files Done according to the guidelines at: http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html --- support/posix.mk | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/support/posix.mk b/support/posix.mk index af84558677..995afc9fab 100644 --- a/support/posix.mk +++ b/support/posix.mk @@ -1,16 +1,24 @@ -prefix ?= $(INSTALLPREFIX) -INSTBIN= $(prefix)/bin -INSTMAN= $(prefix)/share/man1 +INSTBIN= ${DESTDIR}${INSTALLPREFIX}/bin +INSTMAN= ${DESTDIR}${INSTALLPREFIX}/share/man1 +INSTDBG= ${DESTDIR}/usr/lib/debug/${INSTALLPREFIX}/bin MAN=man/tvheadend.1 install: ${PROG} ${MAN} - mkdir -p ${DESTDIR}$(INSTBIN) - install -s ${PROG} ${DESTDIR}$(INSTBIN) + mkdir -p ${INSTBIN} + mkdir -p ${INSTDBG} + install -T ${PROG} ${INSTBIN}/tvheadend - mkdir -p ${DESTDIR}$(INSTMAN) - install ${MAN} ${DESTDIR}$(INSTMAN) + objcopy --only-keep-debug ${INSTBIN}/tvheadend ${INSTDBG}/tvheadend.debug + strip -g ${INSTBIN}/tvheadend + + objcopy --add-gnu-debuglink=${INSTDBG}/tvheadend.debug ${INSTBIN}/tvheadend + + + mkdir -p ${INSTMAN} + install ${MAN} ${INSTMAN} uninstall: - rm -f ${DESTDIR}$(INSTBIN)/${PROG} - rm -f ${DESTDIR}$(INSTMAN)/${MAN} + rm -f ${INSTBIN}/tvheadend + rm -f ${INSTDBG}/tvheadend.debug + rm -f ${INSTMAN}/tvheadend.1