Skip to content

Commit

Permalink
Added support for KEEP_SYMBOLS option
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Feb 18, 2014
1 parent 06e3f8e commit 9528c77
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mms-dump/Makefile
Expand Up @@ -41,6 +41,15 @@ WARNINGS = -Wall
CFLAGS = $(shell pkg-config --cflags $(PKGS)) -MMD
LIBS = $(shell pkg-config --libs $(LIB_PKGS))

ifndef KEEP_SYMBOLS
KEEP_SYMBOLS = 0
endif

ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
SUBMAKE_OPTS += KEEP_SYMBOLS=1
endif

DEBUG_CFLAGS = $(WARNINGS) $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CFLAGS)
RELEASE_CFLAGS = $(WARNINGS) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CFLAGS)
DEBUG_LIBS = $(LIBS)
Expand Down Expand Up @@ -98,4 +107,6 @@ $(DEBUG_EXE): $(DEBUG_EXE_DEPS) $(DEBUG_OBJS)

$(RELEASE_EXE): $(RELEASE_EXE_DEPS) $(RELEASE_OBJS)
$(LD) $(RELEASE_FLAGS) $(RELEASE_OBJS) $(RELEASE_LIBS) -o $@
ifeq ($(KEEP_SYMBOLS),0)
strip $@
endif

0 comments on commit 9528c77

Please sign in to comment.