[Android] [PATCH 4/4] contrib: Allow libebml build on Android x86

Edward Wang edward.c.wang at compdigitec.com
Thu Jul 26 02:31:25 CEST 2012


This package needs exceptions.
---
 contrib/src/ebml/rules.mak |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak
index 4df752d..b0bba29 100644
--- a/contrib/src/ebml/rules.mak
+++ b/contrib/src/ebml/rules.mak
@@ -15,11 +15,21 @@ libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
 	$(APPLY) $(SRC)/ebml/no-ansi.patch
 	$(MOVE)
 
+EBML_EXTRA_FLAGS = ""
+ifdef HAVE_ANDROID
+ifeq ($(ANDROID_ABI), x86)
+# libebml requires exceptions
+EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions" \
+					CPPFLAGS="${CPPFLAGS} -fexceptions" \
+					CFLAGS="${CFLAGS} -fexceptions"
+endif
+endif
+
 .ebml: libebml
 ifdef HAVE_WIN32
 	cd $< && $(MAKE) -C make/mingw32 prefix="$(PREFIX)" $(HOSTVARS) SHARED=no
 else
-	cd $< && $(MAKE) -C make/linux prefix="$(PREFIX)" $(HOSTVARS) staticlib
+	cd $< && $(MAKE) -C make/linux prefix="$(PREFIX)" $(HOSTVARS) $(EBML_EXTRA_FLAGS) staticlib
 endif
 	cd $< && $(MAKE) -C make/linux install_staticlib install_headers prefix="$(PREFIX)" $(HOSTVARS)
 	$(RANLIB) "$(PREFIX)/lib/libebml.a"
-- 
1.7.5.4



More information about the Android mailing list