easy-setup: Add missing path for android ndk-r13b 19/21019/4
authorbg.chun <bg.chun@samsung.com>
Mon, 27 Feb 2017 06:24:35 +0000 (15:24 +0900)
committerRick Bell <richard.s.bell@intel.com>
Tue, 27 Jun 2017 17:21:43 +0000 (17:21 +0000)
[IOT-1863]force to include missing  header for build with ndk-r13b

current android build script using ndk-r10d
when update ndk as ndk-r13b,
it showing build fail due missing header file.
So, force to include missing header file

Change-Id: Ic23ab789f907c4e576e83bccc0c26f41350a6446
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17525
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 73b39d4c5450f0863fce16743ee424b5cb95ddfd)
Bug: https://jira.iotivity.org/browse/IOT-1863
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21019

build_common/android/SConscript
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/jni/Application.mk

index 1a4f5e0..9db9ef8 100644 (file)
@@ -152,6 +152,21 @@ for flags in p.stdout.readlines():
                env.AppendUnique(CXXFLAGS = Split(flags[9:]))
 
        elif cmp(flags[0:8], 'CPPPATH=') == 0:
+               ndk_arch = 'arch-'
+               if cmp(target_arch, 'x86') == 0:
+                       ndk_arch += 'x86'
+               elif cmp(target_arch, 'x86_64') == 0:
+                       ndk_arch += 'x86_64'
+               elif cmp(target_arch, 'armeabi') == 0:
+                       ndk_arch += 'arm'
+               elif cmp(target_arch, 'armeabi-v7a') == 0:
+                       ndk_arch += 'arm'
+               elif cmp(target_arch, 'armeabi-v7a-hard') == 0:
+                       ndk_arch += 'arm'
+               elif cmp(target_arch, 'arm64-v8a') == 0:
+                       ndk_arch += 'arm64'
+
+               env.AppendUnique(CPPPATH = android_ndk+'/platforms/android-21/'+ndk_arch+'/usr/include')
                env.AppendUnique(CPPPATH = Split(flags[8:]))
 
        elif cmp(flags[0:8], 'SYSROOT=') == 0:
@@ -164,9 +179,8 @@ for flags in p.stdout.readlines():
        elif cmp(flags[0:7], 'TC_VER=') == 0:  # set gnustl library path
                ver = flags[7:].strip()
                stl_path = android_ndk + '/sources/cxx-stl/gnu-libstdc++/' + ver + '/libs/' + target_arch
-               if target_arch in ['armeabi', 'armeabi-v7a', 'armeabi-v7a-hard']:
-                       stl_path = stl_path + '/thumb/'
-
+#              if target_arch in ['armeabi', 'armeabi-v7a', 'armeabi-v7a-hard']:
+#                      stl_path = stl_path + '/thumb/'
                env.AppendUnique(LIBPATH = [stl_path])
                env.Install(env.get('BUILD_DIR'), stl_path + '/libgnustl_shared.so')