iotivity 0.9.0
[platform/upstream/iotivity.git] / build_common / android / compatibility / c_compat.scons
1 ##
2 # This script is for fixing android platform compatibility problem
3 ##
4
5 # To fix android NDK compatibility problem
6 # Some functions, e.g. rand, srand. strtof ... are static inline prior to
7 # android-L. So before android-L libc.so doesn't include them. If build
8 # on android-L and run on an old platform(earlier than android-L), there will
9 # be 'can't locate xxx' problem.
10 import os
11
12 Import('env')
13
14 sif_env = env.Clone()
15
16 sif_lib = sif_env.StaticLibrary(env.get('BUILD_DIR') + '/c_compat',
17         env.SrcToObj(os.path.abspath('./c_compat.c'), env.get('SRC_DIR')))
18
19 env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
20 env.AppendUnique(LIBS = ['c_compat'])