+++ /dev/null
-#******************************************************************
-#
-# Copyright 2016 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.
-#
-#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-######################################################################
-# easy-setup Mediator CSDK build script
-######################################################################
-
-import os
-
-Import('env')
-
-env.AppendUnique(CPPDEFINES = ['EASY_SETUP_CA_INIT'])
-
-if env.get('RELEASE'):
- env.AppendUnique(CCFLAGS = ['-Os'])
- env.AppendUnique(CPPDEFINES = ['NDEBUG'])
-else:
- env.AppendUnique(CCFLAGS = ['-g'])
-
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-
-# Easysetup provides reference implemenation of Arduino Enrollee.
-# Mediator applications developed on different platforms will be default defining the
-# flag 'REMOTE_ARDUINO_ENROLEE'. If the target Enrollee is not Arduino, the below commented
-# modifications must be enabled instead (and the existing define must be commented).
-#
-##### The following lines must be uncommented, if target Enrollee is not Arduino
-target_enrollee = env.get('ES_TARGET_ENROLLEE')
-if target_enrollee == 'arduino':
- print "REMOTE_ARDUINO_ENROLEE flag is defined."
- print "The Mediator application will be working only with Arduino Enrollee."
- env.AppendUnique(CPPDEFINES = ['REMOTE_ARDUINO_ENROLEE'])
-
-lib_env = env.Clone()
-easy_setup_env = env.Clone()
-
-target_os = env.get('TARGET_OS')
-
-if target_os in ['android']:
- # Add third party libraries
- SConscript('#service/third_party_libs.scons', 'lib_env')
-
-######################################################################
-# Build flags
-######################################################################
-
-easy_setup_env.AppendUnique(CPPPATH = ['inc', 'src','../../inc'])
-easy_setup_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
-if target_os in ['linux']:
- easy_setup_env.AppendUnique(LIBS = ['pthread', 'dl'])
-
-
-######################################################################
-# Linux Mediator
-######################################################################
-if target_os in ['linux']:
- easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
- easy_setup_env.AppendUnique(CXXFLAGS = ['-pthread'])
- easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction'])
-
-######################################################################
-# Android Mediator
-######################################################################
-if target_os == 'android':
- easy_setup_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- easy_setup_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
- easy_setup_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- easy_setup_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'gnustl_shared'])
- if not env.get('RELEASE'):
- easy_setup_env.AppendUnique(LIBS = ['log'])
-
-
-if target_os in ['android','linux']:
- easy_setup_env.PrependUnique(CPPPATH = [
- env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
- env.get('SRC_DIR') + '/resource/csdk/connectivity/common/inc',
- env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
- env.get('SRC_DIR') + '/resource/csdk/stack/include',
- env.get('SRC_DIR') + '/resource/csdk/security/include',
- env.get('SRC_DIR') + '/extlibs/cjson',
- env.get('SRC_DIR') + '/service/easy-setup/inc',
- 'inc'])
-
-######################################################################
-# Source files and Targets
-######################################################################
-
-if target_os == 'android':
- es_m_csdk_static = easy_setup_env.StaticLibrary('libESMediatorCSDK',
- ['src/provisioningapi.cpp',
- 'src/wifiprovisioning.cpp',
- 'src/provisioning.cpp'])
- easy_setup_env.InstallTarget(es_m_csdk_static, 'libESMediatorCSDK')
-
-if target_os in ['linux']:
- es_m_csdk_shared = easy_setup_env.SharedLibrary('ESMediatorCSDK',
- ['src/provisioningapi.cpp',
- 'src/wifiprovisioning.cpp',
- 'src/provisioning.cpp'])
- easy_setup_env.InstallTarget(es_m_csdk_shared, 'libESMediatorCSDK')
-
- #Go to build sample apps
- SConscript('../../sampleapp/mediator/linux/csdk_sample/SConscript')
-
-######################################################################
-#Build UnitTestcases for Mediator[CSDK]
-################################################ ######################
-if target_os in ['linux']:
- SConscript('unittests/SConscript')
-
-
-
-
-
-
-
-
-
+++ /dev/null
-#******************************************************************
-#
-# Copyright 2016 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.
-#
-#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-##
-# Mediator[CSDK] Unit Test build script
-##
-import os
-
-# SConscript file for Local PKI google tests
-gtest_env = SConscript('#extlibs/gtest/SConscript')
-lib_env = gtest_env.Clone()
-
-if lib_env.get('RELEASE'):
- lib_env.AppendUnique(CCFLAGS = ['-Os'])
- lib_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
-else:
- lib_env.AppendUnique(CCFLAGS = ['-g'])
-
-if lib_env.get('LOGGING'):
- lib_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-
-# Add third party libraries
-SConscript('#service/third_party_libs.scons', 'lib_env')
-
-target_os = lib_env.get('TARGET_OS')
-if target_os in ['linux']:
- # Verify that 'hippomocks' mocking code is installed. If not,
- # get it and install it
- SConscript('#extlibs/hippomocks.scons')
-
-mediator_csdk_test_env = lib_env.Clone()
-
-######################################################################
-#unit test setting
-######################################################################
-src_dir = lib_env.get('SRC_DIR')
-
-######################################################################
-# Build flags
-######################################################################
-
-mediator_csdk_test_env.AppendUnique(
- CPPPATH = [
- src_dir + '/extlibs/hippomocks-master',
- '../inc',
- '../../../inc',
- ])
-
-mediator_csdk_test_env.PrependUnique(LIBS = [
- 'ESMediatorCSDK',
- 'oc',
- 'octbstack',
- 'oc_logger',
- 'oc_logger_core',
- 'connectivity_abstraction'])
-
-######################################################################
-# Build Test
-######################################################################
-mediator_csdk_test_src = mediator_csdk_test_env.Glob('./*.cpp')
-
-mediator_csdk_test = mediator_csdk_test_env.Program('mediator_csdk_test', mediator_csdk_test_src)
-Alias("mediator_csdk_test", mediator_csdk_test)
-mediator_csdk_test_env.AppendTarget('mediator_csdk_test')
-
-if mediator_csdk_test_env.get('TEST') == '1':
- target_os = mediator_csdk_test_env.get('TARGET_OS')
- if target_os in ['linux']:
- from tools.scons.RunTest import *
- run_test(mediator_csdk_test_env, '', 'service/easy-setup/mediator/csdk/unittests/mediator_csdk_test')