-#******************************************************************\r
-#\r
-# Copyright 2015 Samsung Electronics All Rights Reserved.\r
-#\r
-#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-#\r
-#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
-\r
-##\r
-# rcs_common (primitiveResource and expiryTimer) build script\r
-##\r
-import os\r
-Import('env')\r
-\r
-# Add third party libraries\r
-lib_env = env.Clone()\r
-SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', exports = 'lib_env')\r
-\r
-src_dir = lib_env.get('SRC_DIR')\r
-\r
-gtest_dir = src_dir + '/extlibs/gtest/gtest-1.7.0'\r
-\r
-rcs_common_env = lib_env.Clone()\r
-target_os = env.get('TARGET_OS')\r
-\r
-release = env.get('RELEASE')\r
-\r
-######################################################################\r
-# Build flags\r
-######################################################################\r
-rcs_common_env.AppendUnique(CPPPATH = [\r
- env.get('SRC_DIR')+'/extlibs',\r
- '../../include',\r
- 'primitiveResource/include'])\r
- \r
-rcs_common_env.AppendUnique(CPPPATH = [\r
- 'expiryTimer/include',\r
- 'expiryTimer/src'])\r
-\r
-if target_os not in ['windows', 'winrt']:\r
- rcs_common_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])\r
- if target_os != 'android':\r
- rcs_common_env.AppendUnique(CXXFLAGS = ['-pthread'])\r
-\r
+#******************************************************************
+#
+# Copyright 2015 Samsung Electronics All Rights Reserved.
+#
+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+##
+# rcs_common (primitiveResource and expiryTimer) build script
+##
+import os
+Import('env')
+
+# Add third party libraries
+lib_env = env.Clone()
+SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', exports = 'lib_env')
+
+src_dir = lib_env.get('SRC_DIR')
+
+gtest_dir = src_dir + '/extlibs/gtest/gtest-1.7.0'
+
+rcs_common_env = lib_env.Clone()
+target_os = env.get('TARGET_OS')
+
+release = env.get('RELEASE')
+
+######################################################################
+# Build flags
+######################################################################
+rcs_common_env.AppendUnique(CPPPATH = [
+ env.get('SRC_DIR')+'/extlibs',
+ '../../include',
+ 'primitiveResource/include'])
+
+rcs_common_env.AppendUnique(CPPPATH = [
+ 'expiryTimer/include',
+ 'expiryTimer/src'])
+
+rcs_common_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+
+if target_os not in ['windows', 'winrt']:
+ rcs_common_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
+ if target_os != 'android':
+ rcs_common_env.AppendUnique(CXXFLAGS = ['-pthread'])
+ rcs_common_env.AppendUnique(LIBS = ['pthread'])
+
if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
rcs_common_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
-if target_os == 'android':\r
- rcs_common_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])\r
- rcs_common_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])\r
-\r
-rcs_common_env.AppendUnique(LIBS = ['dl'])\r
-\r
-if not release:\r
- rcs_common_env.AppendUnique(CXXFLAGS = ['--coverage'])\r
- rcs_common_env.PrependUnique(LIBS = ['gcov'])\r
-\r
-######################################################################\r
-# Source files and Targets\r
-######################################################################\r
-TIMER_SRC_DIR = 'expiryTimer/src/'\r
-RESOURCE_SRC = 'primitiveResource/src/'\r
-rcs_common_src = [\r
- TIMER_SRC_DIR + 'ExpiryTimerImpl.cpp', \r
- TIMER_SRC_DIR + 'ExpiryTimer.cpp',\r
- RESOURCE_SRC + 'PresenceSubscriber.cpp',\r
- RESOURCE_SRC + 'PrimitiveResource.cpp',\r
- RESOURCE_SRC + 'RCSException.cpp',\r
- RESOURCE_SRC + 'RCSAddress.cpp',\r
- RESOURCE_SRC + 'ResourceAttributes.cpp',\r
- RESOURCE_SRC + 'ResponseStatement.cpp'\r
- ]\r
- \r
-rcs_common_static = rcs_common_env.StaticLibrary('rcs_common', rcs_common_src)\r
-rcs_common_shared = rcs_common_env.SharedLibrary('rcs_common', rcs_common_src)\r
-rcs_common_env.InstallTarget([rcs_common_static,rcs_common_shared], 'rcs_common')\r
-\r
-######################################################################\r
-# Build Test primitive Resource\r
-######################################################################\r
-rcs_common_test_env = rcs_common_env.Clone();\r
-\r
-rcs_common_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])\r
-rcs_common_test_env.PrependUnique(CPPPATH = [\r
- env.get('SRC_DIR')+'/extlibs/hippomocks-master',\r
- gtest_dir + '/include',\r
- 'utils/include'\r
- ])\r
-\r
-gtest = File(gtest_dir + '/lib/.libs/libgtest.a')\r
-gtest_main = File(gtest_dir + '/lib/.libs/libgtest_main.a')\r
-\r
-rcs_common_test_env.PrependUnique(LIBS = [\r
- 'oc',\r
- 'octbstack',\r
- 'oc_logger',\r
- 'connectivity_abstraction',\r
- 'coap',\r
- 'rcs_common',\r
- gtest,\r
- gtest_main,\r
- 'pthread'\r
- ])\r
-\r
-rcs_common_test_src = env.Glob('primitiveResource/unittests/*.cpp')\r
-\r
-rcs_common_test = rcs_common_test_env.Program('rcs_common_test', rcs_common_test_src)\r
-Alias("rcs_common_test", rcs_common_test)\r
+if target_os == 'android':
+ rcs_common_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
+ rcs_common_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
+
+rcs_common_env.AppendUnique(LIBS = ['dl', 'oc'])
+
+if not release:
+ rcs_common_env.AppendUnique(CXXFLAGS = ['--coverage'])
+ rcs_common_env.PrependUnique(LIBS = ['gcov'])
+
+######################################################################
+# Source files and Targets
+######################################################################
+TIMER_SRC_DIR = 'expiryTimer/src/'
+RESOURCE_SRC = 'primitiveResource/src/'
+rcs_common_src = [
+ TIMER_SRC_DIR + 'ExpiryTimerImpl.cpp',
+ TIMER_SRC_DIR + 'ExpiryTimer.cpp',
+ RESOURCE_SRC + 'PresenceSubscriber.cpp',
+ RESOURCE_SRC + 'PrimitiveResource.cpp',
+ RESOURCE_SRC + 'RCSException.cpp',
+ RESOURCE_SRC + 'RCSAddress.cpp',
+ RESOURCE_SRC + 'ResourceAttributes.cpp',
+ RESOURCE_SRC + 'ResponseStatement.cpp'
+ ]
+
+rcs_common_static = rcs_common_env.StaticLibrary('rcs_common', rcs_common_src)
+rcs_common_shared = rcs_common_env.SharedLibrary('rcs_common', rcs_common_src)
+rcs_common_env.InstallTarget([rcs_common_static,rcs_common_shared], 'rcs_common')
+
+######################################################################
+# Build Test primitive Resource
+######################################################################
+rcs_common_test_env = rcs_common_env.Clone();
+
+rcs_common_test_env.PrependUnique(CPPPATH = [
+ env.get('SRC_DIR')+'/extlibs/hippomocks-master',
+ gtest_dir + '/include',
+ 'utils/include'
+ ])
+
+gtest = File(gtest_dir + '/lib/.libs/libgtest.a')
+gtest_main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
+
+rcs_common_test_env.PrependUnique(LIBS = [
+ 'octbstack',
+ 'oc_logger',
+ 'connectivity_abstraction',
+ 'coap',
+ 'rcs_common',
+ gtest,
+ gtest_main,
+ 'pthread'
+ ])
+
+rcs_common_test_src = env.Glob('primitiveResource/unittests/*.cpp')
+
+rcs_common_test = rcs_common_test_env.Program('rcs_common_test', rcs_common_test_src)
+Alias("rcs_common_test", rcs_common_test)
env.AppendTarget('rcs_common_test')