Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[libwspcodec] Leave debug symbols in release build for debuginfo package
  • Loading branch information
monich committed Feb 21, 2014
1 parent f224de6 commit d28d294
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion Makefile
@@ -1,4 +1,4 @@
# -*- Mode: makefile -*-
# -*- Mode: makefile-gmake -*-

.PHONY: clean all debug release pkgconfig install install-dev

Expand Down Expand Up @@ -55,6 +55,15 @@ RELEASE_CFLAGS = -O2 $(CFLAGS) -MMD -MP
RELEASE_LDFLAGS = $(LDFLAGS)
ARFLAGS = rc

ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif

ifneq ($(KEEP_SYMBOLS),0)
RELEASE_CFLAGS += -g
RELEASE_LDFLAGS += -g
endif

#
# Files
#
Expand Down Expand Up @@ -104,7 +113,9 @@ $(DEBUG_LIB): $(DEBUG_BUILD_DIR) $(DEBUG_OBJS)

$(RELEASE_LIB): $(RELEASE_BUILD_DIR) $(RELEASE_OBJS)
$(LD) -o $@ $(RELEASE_LDFLAGS) $(RELEASE_OBJS)
ifeq ($(KEEP_SYMBOLS),0)
strip $@
endif

$(DEBUG_BUILD_DIR)/%.o : $(SRC_DIR)/%.c
$(CC) -c $(DEBUG_CFLAGS) -MF"$(@:%.o=%.d)" $< -o $@
Expand Down
2 changes: 1 addition & 1 deletion rpm/libwspcodec.spec
Expand Up @@ -26,7 +26,7 @@ This package contains the development library for %{name}.
%setup -q

%build
make release pkgconfig
make KEEP_SYMBOLS=1 release pkgconfig

%install
rm -rf %{buildroot}
Expand Down

0 comments on commit d28d294

Please sign in to comment.