2 # The main build script
8 # List of targets that only support the IoTivity C SDK.
9 targets_csdk_only = ['arduino']
11 # Load common build config
12 SConscript('build_common/SConscript', exports = 'targets_csdk_only')
16 target_os = env.get('TARGET_OS')
17 if target_os == 'arduino':
18 SConscript('arduino.scons')
21 env.PrepareLib('cereal')
22 env.PrepareLib('expat')
23 env.PrepareLib('boost', 'boost_thread', os.path.join(env.get('SRC_DIR'), 'extlibs', 'boost'))
24 env.PrepareLib('boost', 'boost_system', os.path.join(env.get('SRC_DIR'), 'extlibs', 'boost'))
26 # By default, src_dir is current dir, the build_dir is:
27 # ./out/<target_os>/<target_arch>/<release or debug>/
29 # The build_dir is a variant directory of the source directory(You can
30 # consider build_dir as a soft link to src_dir, for detail please refer to:
31 # http://www.scons.org/doc/production/HTML/scons-user.html#f-VariantDir
33 # Any way, to make the output is in build_dir, when load scripts, the path should
34 # be relevant to build_dir.
35 build_dir = env.get('BUILD_DIR')
37 # Build 'resource' sub-project
38 SConscript(os.path.join(build_dir, 'resource', 'SConscript'),
39 exports = 'targets_csdk_only')
41 # Build 'service' sub-project
42 SConscript(os.path.join(build_dir, 'service', 'SConscript'),
43 exports = 'targets_csdk_only')
45 # Append targets information to the help information, to see help info, execute command line:
49 # Print bin upload command line (arduino only)
50 if target_os == 'arduino':