Skip to content
Permalink
Browse files
Added support for KEEP_SYMBOLS option
  • Loading branch information
monich committed Feb 18, 2014
1 parent 06e3f8e commit 9528c77e602f3121e4ea37fe3a3c6410cc3bbc4c
Showing with 11 additions and 0 deletions.
  1. +11 −0 mms-dump/Makefile
@@ -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)
@@ -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.