Imported Upstream version 0.9.1
[platform/upstream/iotivity.git] / resource / src / SConscript
index 3a50c87..2e2c94f 100644 (file)
@@ -1,3 +1,23 @@
+#******************************************************************
+#
+# Copyright 2014 Intel Mobile Communications GmbH 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.
+#
+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
 ##
 # OCLib (share library) build script
 ##
@@ -14,11 +34,11 @@ oclib_env = lib_env.Clone()
 oclib_env.AppendUnique(CPPPATH = [
                '../include/',
                '../csdk/stack/include',
-               '../csdk/ocsocket/include',
                '../csdk/ocrandom/include',
+               '../csdk/ocmalloc/include',
                '../csdk/logger/include',
-               '../csdk/libcoap',
-               '../oc_logger/include'
+               '../oc_logger/include',
+               '../csdk/connectivity/lib/libcoap-4.1.1'
                ])
 
 target_os = env.get('TARGET_OS')
@@ -28,11 +48,11 @@ if target_os not in ['windows', 'winrt']:
 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', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
 
 if target_os in ['darwin', 'ios']:
        oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-       oclib_env.AppendUnique(LIBS = ['octbstack', 'coap', 'oc_logger'])
+       oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
 
 ######################################################################
 # Source files and Targets
@@ -45,9 +65,11 @@ oclib_src = [
                'OCException.cpp',
                'OCRepresentation.cpp',
                'InProcServerWrapper.cpp',
-               'InProcClientWrapper.cpp'
+               'InProcClientWrapper.cpp',
+               'OCResourceRequest.cpp'
        ]
 
-shared_oclib = oclib_env.SharedLibrary('oc', oclib_src)
-static_oclib = oclib_env.StaticLibrary('oc', oclib_src)
-oclib_env.InstallTarget([shared_oclib, static_oclib], 'liboc')
+oclib_env.AppendUnique(CPPPATH = [oclib_env.get('SRC_DIR') + '/extlibs/cereal/include'])
+oclib = oclib_env.SharedLibrary('oc', oclib_src)
+oclib_env.InstallTarget(oclib, 'liboc')
+