ref: 3bcf6069ab6751bbfac8c23a061bae03900a5957
parent: 6dc3f72ef8c25058bb5ca4b4279891811e216592
author: Guangwei Wang <guangwwa@cisco.com>
date: Tue Dec 8 04:52:03 EST 2015
add stripped lib for firefox and modify README for the usage fo DEBUGSYMBOLS
--- a/Makefile
+++ b/Makefile
@@ -66,6 +66,11 @@
LDFLAGS += -fsanitize=address
endif
+STRIP_FLAGS := -S
+ifeq (linux, $((OS)))
+STRIP_FLAGS := -g
+endif
+
# Make sure the all target is the first one
all: libraries binaries
@@ -220,10 +225,16 @@
$(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
$(QUIET_AR)$(AR) $(AR_OPTS) $+
+ifeq (True, $(DEBUGSYMBOLS))
+ strip $(STRIP_FLAGS) $@ -o $(LIBPREFIX)$(PROJECT_NAME)_stripped.$(LIBSUFFIX)
+endif
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS)
+ifeq (True, $(DEBUGSYMBOLS))
+ strip $(STRIP_FLAGS) $@ -o $(LIBPREFIX)$(PROJECT_NAME)_stripped.$(SHAREDLIBSUFFIXVER)
+endif
ifneq ($(SHAREDLIBSUFFIXVER),$(SHAREDLIBSUFFIX))
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX): $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
@@ -245,10 +256,16 @@
$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) $(MODULE_LDFLAGS)
+ifeq (True, $(DEBUGSYMBOLS))
+ strip $(STRIP_FLAGS) $@ -o $(LIBPREFIX)$(MODULE_NAME)_stripped.$(SHAREDLIBSUFFIXVER)
+endif
ifneq ($(SHAREDLIBSUFFIXVER),$(SHAREDLIBSUFFIX))
$(MODULE): $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER)
$(QUIET)ln -sfn $+ $@
+ifeq (True, $(DEBUGSYMBOLS))
+ $(QUIET)ln -sfn $(LIBPREFIX)$(MODULE_NAME)_stripped.$(SHAREDLIBSUFFIXVER) $(LIBPREFIX)$(MODULE_NAME)_stripped.$(SHAREDLIBSUFFIX)
+endif
endif
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
--- a/README.md
+++ b/README.md
@@ -130,6 +130,7 @@
- `make ARCH=i386` for x86 32bit builds
- `make ARCH=x86_64` for x86 64bit builds
- `make V=No` for a silent build (not showing the actual compiler commands)
+- `make DEBUGSYMBOLS=True` for two libraries, one is normal libraries, another one is removed the debugging symbol table entries (those created by the -g option )
The command line programs `h264enc` and `h264dec` will appear in the main project directory.