cmd = [ndk_build_cmd]
cmd.append('APP_ABI=' + target_arch)
-cmd.append('APP_STL=gnustl_static')
+cmd.append('APP_STL=gnustl_shared')
if env.get('RELEASE'):
cmd.append('APP_OPTIM=release')
else:
elif cmp(flags[0:7], 'TC_VER=') == 0: # set gnustl library path
ver = flags[7:].strip()
- env.AppendUnique(LIBPATH = [android_ndk + '/sources/cxx-stl/gnu-libstdc++/'
- + ver + '/libs/' + target_arch])
+ 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/'
+
+ env.AppendUnique(LIBPATH = [stl_path])
+ env.Install(env.get('BUILD_DIR'), stl_path + '/libgnustl_shared.so')
elif cmp(flags[0:9], 'PLATFORM=') == 0: # get target platform: android-x
platform_ver = flags[9+8:].strip()
if target_os == 'android':
compatibilitylib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- compatibilitylib_env.AppendUnique(LIBS = ['gnustl_static'])
+ compatibilitylib_env.AppendUnique(LIBS = ['gnustl_shared'])
######################################################################
# Source files and Targets
if target_os == 'android':
examples_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- examples_env.AppendUnique(LIBS = ['gnustl_static'])
+ examples_env.AppendUnique(LIBS = ['gnustl_shared'])
if not env.get('RELEASE'):
examples_env.AppendUnique(LIBS = ['log'])
target_os = env.get('TARGET_OS')
if target_os == 'android':
liboc_logger_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- liboc_logger_env.AppendUnique(LIBS = ['gnustl_static', 'log'])
+ liboc_logger_env.AppendUnique(LIBS = ['gnustl_shared', 'log'])
if target_os not in ['arduino', 'windows', 'winrt']:
liboc_logger_env.AppendUnique(CFLAGS = ['-std=c99'])
target_os = env.get('TARGET_OS')
if target_os == 'android':
examples_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- examples_env.AppendUnique(LIBS = ['gnustl_static'])
+ examples_env.AppendUnique(LIBS = ['gnustl_shared'])
if target_os not in ['arduino', 'windows', 'winrt']:
examples_env.AppendUnique(CFLAGS = Split('-Wall -std=c99 -Werror'))
if target_os == 'android':
oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- oclib_env.AppendUnique(LIBS = ['octbstack', 'coap', 'oc_logger', 'boost_thread', 'gnustl_static', 'log', 'compatibility'])
+ oclib_env.AppendUnique(LIBS = ['octbstack', 'coap', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log', 'compatibility'])
if target_os in ['darwin', 'ios']:
oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
if target_os == 'android':
notimgr_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- notimgr_env.AppendUnique(LIBS = ['gnustl_static'])
+ notimgr_env.AppendUnique(LIBS = ['gnustl_shared'])
if not env.get('RELEASE'):
notimgr_env.AppendUnique(LIBS = ['log'])
if target_os == 'android':
plugins_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- plugins_env.AppendUnique(LIBS = ['gnustl_static'])
+ plugins_env.AppendUnique(LIBS = ['gnustl_shared'])
plugins_env.AppendUnique(LIBS = [File(env.get('BUILD_DIR') + '/libmosquitto.a'),
'mosquitto', 'ssl', 'rt'])
sample_env.AppendUnique(CXXFLAGS = ['-Wall', '-pthread'])
sample_env.AppendUnique(LIBS = ['oc', 'oc_logger', 'octbstack', 'coap', 'ppm', 'pmimpl', 'boost_system', 'boost_thread', 'dl'])
-sample_env.AppendUnique(LIBS = ['pthread'])
+sample_env.AppendUnique(LIBS = ['pthread', 'rt'])
######################################################################
# Source files and Targets
if target_os == 'android':
soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- soft_sensor_manager_env.AppendUnique(LIBS = ['gnustl_static', 'compatibility', 'log'])
+ soft_sensor_manager_env.AppendUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
#######################################################################
## build SSM SDK