Merge branch 'connectivity-abstraction' to master
[platform/upstream/iotivity.git] / service / protocol-plugin / plugin-manager / SConscript
index 5b7461c..dddac58 100644 (file)
@@ -1,27 +1,7 @@
-#******************************************************************
-#
-# Copyright 2014 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.
-#
-#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
 ##
 # plugin-manager project build script
 ##
-
+import os
 Import('env')
 
 # Add third party libraries
@@ -36,16 +16,16 @@ target_os = env.get('TARGET_OS')
 plugin_manager_env.AppendUnique(CPPPATH = [
                '../lib/cpluff/libcpluff',
                'src',
-               '../lib/rapidxml'
+               env.get('SRC_DIR')+'/extlibs/rapidxml'
                ])
 
 if target_os not in ['windows', 'winrt']:
-       plugin_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall',
+       plugin_manager_env.AppendUnique(CXXFLAGS = ['-Wall','-std=c++0x',
                '-fpermissive', '-Wsign-compare'])
 
 if target_os == 'android':
-       plugin_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
-       plugin_manager_env.AppendUnique(LIBS = ['boost_thread-gcc-mt-1_49', 'gnustl_static'])
+       plugin_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions', '-DANDROID'])
+       plugin_manager_env.AppendUnique(LIBS = ['boost_thread', 'boost_system', 'gnustl_shared', 'log'])
 
 plugin_manager_env.AppendUnique(CPPDEFINES = ['CP_C_API=CP_EXPORT',
                                        'CP_HOST=\"\\"'+env.get('TARGET_OS')+'\\"\"',
@@ -68,15 +48,16 @@ ppm = plugin_manager_env.StaticLibrary('ppm', ppm_src)
 
 pmimpl_src = [
                'src/CpluffAdapter.cpp',
-               'src/FelixAdapter.cpp',
                'src/Plugin.cpp',
                'src/PluginManagerImpl.cpp',
                'src/Config.cpp']
 
+if target_os == 'android':
+       pmimpl_src += ['src/FelixAdapter.cpp']
+
 pmimpl_env = plugin_manager_env.Clone()
 pmimpl_env.PrependUnique(CCFLAGS = ['-fPIC'])
 pmimpl_env.PrependUnique(LIBS = File(env.get('BUILD_DIR') + '/libcpluff.a'))
 pmimpl = pmimpl_env.SharedLibrary('pmimpl', pmimpl_src)
 
 plugin_manager_env.InstallTarget([ppm, pmimpl], 'libppm')
-