diff options
author | Chris Browet <koying@semperpax.com> | 2014-06-07 09:06:59 +0200 |
---|---|---|
committer | Chris Browet <koying@semperpax.com> | 2014-06-07 09:06:59 +0200 |
commit | 1d00ba40fe00a8074024f4d12c15de29774d83d1 (patch) | |
tree | 0620e24d87c35f890bd4d791c941e92db5d54af0 | |
parent | 2e421bc8ca4cda903e7a9cc68f077a5ed1c9d6ca (diff) | |
parent | e976eda43dd446ddea1cfffadcdbedbdb33bc42c (diff) |
Merge pull request #4156 from koying/fixdroidndk
FIX: [droid] enable compilation with NDK >= 9b
-rw-r--r-- | tools/depends/Makefile.include.in | 7 | ||||
-rw-r--r-- | tools/depends/configure.in | 6 | ||||
-rw-r--r-- | xbmc/android/activity/AndroidExtra.h | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in index 142092d5bd..3f79caa132 100644 --- a/tools/depends/Makefile.include.in +++ b/tools/depends/Makefile.include.in @@ -2,6 +2,7 @@ abs_top_srcdir=@abs_top_srcdir@ TOOLCHAIN=@use_toolchain@ NDKROOT=@use_ndk@ +NDK_VER=@use_ndk_ver@ SDKROOT=@use_sdk_path@ XBMCROOT=$(abspath $(abs_top_srcdir)/../../) TARBALLS_LOCATION=@use_tarballs@ @@ -47,10 +48,10 @@ READELF=@READELF@ OBJDUMP=@OBJDUMP@ CMAKE=@prefix@/@tool_dir@/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX) -CFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include +CFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -DNDK_VER=@use_ndk_ver@ LDFLAGS=-L@prefix@/@deps_dir@/lib @platform_ldflags@ -CXXFLAGS=@platform_cxxflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -CPPFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include +CXXFLAGS=@platform_cxxflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -DNDK_VER=@use_ndk_ver@ +CPPFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -DNDK_VER=@use_ndk_ver@ PATH:=@prefix@/@tool_dir@/bin:$(PATH) ifneq (@use_build_toolchain@,) diff --git a/tools/depends/configure.in b/tools/depends/configure.in index 6370fc83d1..fe9c27d8bf 100644 --- a/tools/depends/configure.in +++ b/tools/depends/configure.in @@ -378,6 +378,11 @@ if test "$platform_os" == "android"; then AC_MSG_ERROR("NDK path is required for android") fi + if ! test -f "$use_ndk/RELEASE.TXT" ; then + AC_MSG_ERROR("$use_ndk is not an NDK directory") + fi + use_ndk_ver=0x`cat $use_ndk/RELEASE.TXT | sed 's/^r\([0-9]\+\)\b/r\10/' | sed 's/^r\(.*\)\b.*/\1/'` + if test -z $use_sdk_path; then AC_MSG_ERROR("SDK path is required for android") fi @@ -440,6 +445,7 @@ if test "$platform_os" == "android"; then echo -e AC_SUBST(use_sdk_path) AC_SUBST(use_ndk) + AC_SUBST(use_ndk_ver) AC_SUBST(use_sdk) fi diff --git a/xbmc/android/activity/AndroidExtra.h b/xbmc/android/activity/AndroidExtra.h index 2fa05836aa..c33b9da013 100644 --- a/xbmc/android/activity/AndroidExtra.h +++ b/xbmc/android/activity/AndroidExtra.h @@ -21,6 +21,7 @@ /*** Extra's not found in the Android NDK ***/ +#if NDK_VER < 0x9b // missing in early NDKs, is present in r9b+ extern float AMotionEvent_getAxisValue(const AInputEvent* motion_event, int32_t axis, size_t pointer_index); extern typeof(AMotionEvent_getAxisValue) *p_AMotionEvent_getAxisValue; @@ -74,3 +75,5 @@ extern typeof(AMotionEvent_getButtonState) *p_AMotionEvent_getButtonState; #define AMOTION_EVENT_AXIS_RTRIGGER 18 // mouse vertical wheel #define AMOTION_EVENT_AXIS_VSCROLL 0x09 + +#endif |