2 # OCLib (static library) build script
4 Import('env', 'BUILD_TARGET', 'BUILD_DIR', 'SRC_TOP_DIR')
6 # Add third party libraries
7 SConscript(SRC_TOP_DIR + '/third_party_libs.scons')
9 oclib_env = env.Clone()
11 ######################################################################
13 ######################################################################
14 oclib_env.AppendUnique(CPPPATH = [
16 '../csdk/stack/include',
17 '../csdk/ocsocket/include',
18 '../csdk/ocrandom/include',
19 '../csdk/logger/include',
21 '../oc_logger/include'
24 if BUILD_TARGET not in ['windows', 'winrt']:
25 oclib_env.AppendUnique(CXXFLAGS = ['-std=c++11', '-Wall'])
27 if BUILD_TARGET == 'android':
28 oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
29 oclib_env.AppendUnique(CPPDEFINES = ['_GLIBCXX_USE_C99=1', '_GLIBCXX_HAVE_WCSTOF=1'])
31 ######################################################################
32 # Source files and Targets
33 ######################################################################
39 'InProcServerWrapper.cpp',
40 'InProcClientWrapper.cpp'
43 oclib = oclib_env.StaticLibrary('oc', oclib_src)
44 i_ocl = oclib_env.Install(BUILD_DIR, oclib)
46 env.AppendUnique(TS = ['liboc'])