shithub: openh264

Download patch

ref: 3f333b01fdc194d03d5c3902c3a819d53041e7ae
parent: 51d8682139dda35fb5bd390b12a2a8e23671ddc1
parent: 7c0b92e3f61db932486e20b6a3f6b4d650ba62f0
author: Ethan Hugg <ethanhugg@gmail.com>
date: Tue Jun 24 04:44:04 EDT 2014

Merge pull request #1004 from emannion/android_plugin

building plugin on Android

--- a/Makefile
+++ b/Makefile
@@ -181,7 +181,7 @@
 
 $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
 	$(QUIET)rm -f $@
-	$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS)
+	$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(LOCAL_LDLIBS)
 
 install-headers:
 	mkdir -p $(PREFIX)/include/wels
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -40,6 +40,7 @@
 LDFLAGS += --sysroot=$(SYSROOT)
 SHLDFLAGS = -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so
 
+LOCAL_LDLIBS := $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a 
 STL_INCLUDES = \
     -I$(NDKROOT)/sources/cxx-stl/stlport/stlport
 
--- a/module/targets.mk
+++ b/module/targets.mk
@@ -6,7 +6,7 @@
 
 OBJS += $(MODULE_OBJS)
 $(MODULE_SRCDIR)/%.$(OBJ): $(MODULE_SRCDIR)/%.cpp
-	$(QUIET_CXX)$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(MODULE_CFLAGS) $(MODULE_INCLUDES) -c $(CXX_O) $<
+	$(QUIET_CXX)$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(MODULE_CFLAGS) $(MODULE_INCLUDES) $(STL_INCLUDES) -c $(CXX_O) $<
 
 $(LIBPREFIX)module.$(LIBSUFFIX): $(MODULE_OBJS)
 	$(QUIET)rm -f $@