1 #******************************************************************
3 # Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # The main build script
26 # Load common build config
27 SConscript('build_common/SConscript')
30 SConscript('extra_options.scons')
33 target_os = env.get('TARGET_OS')
34 if target_os == 'arduino':
35 SConscript('arduino.scons')
36 # By default, src_dir is current dir, the build_dir is:
37 # ./out/<target_os>/<target_arch>/<release or debug>/
39 # The build_dir is a variant directory of the source directory(You can
40 # consider build_dir as a soft link to src_dir, for detail please refer to:
41 # http://www.scons.org/doc/production/HTML/scons-user.html#f-VariantDir
43 # Any way, to make the output is in build_dir, when load scripts, the path should
44 # be relevant to build_dir.
45 build_dir = env.get('BUILD_DIR')
47 # Build 'resource' sub-project
48 SConscript(build_dir + 'resource/SConscript')
50 if target_os not in ['arduino','darwin','ios', 'android']:
51 SConscript(build_dir + 'examples/OICMiddle/SConscript')
53 # Build 'service' sub-project
54 if target_os != 'android':
55 SConscript(build_dir + 'service/SConscript')
57 # Append targets information to the help information, to see help info, execute command line:
61 # Print bin upload command line (arduino only)
62 if target_os == 'arduino':