X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=SConstruct;h=3a69fe51a96ec52722162671c4e20181740df470;hb=a19db60b7dd90b1984c00ff9f1ba58a57cc1e7f0;hp=a4900f3c262933e29ab7b0463e14bf7cb4b8bc69;hpb=c761c2a0a1c016417fe66bca8de6bf68d61e6821;p=platform%2Fupstream%2Fiotivity.git diff --git a/SConstruct b/SConstruct index a4900f3..3a69fe5 100644 --- a/SConstruct +++ b/SConstruct @@ -1,29 +1,46 @@ +#****************************************************************** +# +# 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. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + ## # The main build script # ## - import os -# List of targets that only support the IoTivity C SDK. -targets_csdk_only = ['arduino','darwin','ios'] - # Load common build config -SConscript('build_common/SConscript', exports = 'targets_csdk_only') +SConscript('build_common/SConscript') Import('env') +if os.environ.get('TERM') != None: + env['ENV']['TERM'] = os.environ['TERM'] + +# Load extra options +SConscript('extra_options.scons') + target_os = env.get('TARGET_OS') +if target_os == 'arduino': + SConscript('arduino.scons') -if target_os not in targets_csdk_only: - # Prepare libraries - env.PrepareLib('cereal') - env.PrepareLib('expat') - env.PrepareLib('boost', 'boost_thread', os.path.join(env.get('SRC_DIR'), 'extlibs', 'boost')) - env.PrepareLib('boost', 'boost_system', os.path.join(env.get('SRC_DIR'), 'extlibs', 'boost')) -else: - if target_os == 'arduino': - SConscript('arduino.scons') +if target_os == 'android': + SConscript('android/android_api/SConscript') # By default, src_dir is current dir, the build_dir is: # ./out//// @@ -37,12 +54,24 @@ else: build_dir = env.get('BUILD_DIR') # Build 'resource' sub-project -SConscript(os.path.join(build_dir, 'resource', 'SConscript'), - exports = 'targets_csdk_only') +SConscript(build_dir + 'resource/SConscript') + +if target_os not in ['arduino','darwin','ios', 'android', 'msys_nt', 'windows', 'tizenrt']: + SConscript(build_dir + 'examples/OICMiddle/SConscript') # Build 'service' sub-project -SConscript(os.path.join(build_dir, 'service', 'SConscript'), - exports = 'targets_csdk_only') +if target_os not in ['tizenrt']: + SConscript(build_dir + 'service/SConscript') + +# Build "cloud" sub-project +SConscript(build_dir + 'cloud/SConscript') + +# Build "plugin interface" sub-project +if target_os not in ['tizenrt']: + SConscript(build_dir + 'plugins/SConscript') + +if target_os == 'tizenrt': + SConscript('../apps' + '/SConscript') # Append targets information to the help information, to see help info, execute command line: # $ scon [options] -h @@ -51,3 +80,7 @@ env.PrintTargets() # Print bin upload command line (arduino only) if target_os == 'arduino': env.UploadHelp() + +# to install the generated pc file into custom prefix location +env.UserInstallTargetPCFile('iotivity.pc', 'iotivity.pc') +