Do not strip debug info when debugging is enabled

Then DEBUG is set to TRUE, the resulting binaries contain debugging
information. Since those binaries are however always stripped during
installation, this debug information is effectively unusable.

Fix this by not stripping the resulting binaries during installation
in such a case.

Fixes: a7a2de9b80 ("Makefile: add debug flag")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
This commit is contained in:
Armin Wolf 2024-04-16 03:39:32 +02:00
parent 0e9cfe0a6e
commit 517cb39a8c
1 changed files with 7 additions and 0 deletions

View File

@ -80,9 +80,16 @@ INSTALL = cp
INSTALLFLAGS ?= -f INSTALLFLAGS ?= -f
else else
INSTALL = install INSTALL = install
# Do not strip debug info when in debug mode
ifeq ($(DEBUG),TRUE)
INSTALLFLAGS ?= -m 555
else
INSTALLFLAGS ?= -m 555 -s INSTALLFLAGS ?= -m 555 -s
endif endif
endif
INSTALLPROG = \ INSTALLPROG = \
mkdir -p $(DESTDIR)$(INSTALLDIR); \ mkdir -p $(DESTDIR)$(INSTALLDIR); \
$(INSTALL) $(INSTALLFLAGS) ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG) $(INSTALL) $(INSTALLFLAGS) ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)