Commit 9528c77e authored by Slava Monich's avatar Slava Monich

Added support for KEEP_SYMBOLS option

parent 06e3f8e8
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment