Added commentary to the public API referring to new functionality of
[platform/upstream/iotivity.git] / src / SConscript
1 ##
2 # OCLib (static library) build script
3 ##
4 Import('env', 'BUILD_TARGET', 'BUILD_DIR', 'SRC_TOP_DIR')
5
6 # Add third party libraries
7 SConscript(SRC_TOP_DIR + '/third_party_libs.scons')
8
9 oclib_env = env.Clone()
10
11 ######################################################################
12 # Build flags
13 ######################################################################
14 oclib_env.AppendUnique(CPPPATH = [
15                 '../include/',
16                 '../csdk/stack/include',
17                 '../csdk/ocsocket/include',
18                 '../csdk/ocrandom/include',
19                 '../csdk/logger/include',
20                 '../csdk/libcoap',
21                 '../oc_logger/include'
22                 ])
23
24 if BUILD_TARGET not in ['windows', 'winrt']:
25         oclib_env.AppendUnique(CXXFLAGS = ['-std=c++11', '-Wall'])
26
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'])
30
31 ######################################################################
32 # Source files and Targets
33 ######################################################################
34 oclib_src = [
35                 'OCPlatform.cpp',
36                 'OCResource.cpp',
37                 'OCUtilities.cpp',
38                 'OCException.cpp',
39                 'InProcServerWrapper.cpp',
40                 'InProcClientWrapper.cpp'
41         ]
42
43 oclib = oclib_env.StaticLibrary('oc', oclib_src)
44 i_ocl = oclib_env.Install(BUILD_DIR, oclib)
45 Alias('liboc', i_ocl)
46 env.AppendUnique(TS = ['liboc'])