2 # The main build script
8 # Load common build config
9 SConscript('build_common/SConscript')
13 target_os = env.get('TARGET_OS')
14 if target_os == 'arduino':
15 SConscript('arduino.scons')
18 env.PrepareLib('cereal')
19 env.PrepareLib('expat')
20 env.PrepareLib('boost', 'boost_thread', os.path.join(env.get('SRC_DIR'), 'extlibs', 'boost'))
21 env.PrepareLib('boost', 'boost_system', os.path.join(env.get('SRC_DIR'), 'extlibs', 'boost'))
23 # By default, src_dir is current dir, the build_dir is:
24 # ./out/<target_os>/<target_arch>/<release or debug>/
26 # The build_dir is a variant directory of the source directory(You can
27 # consider build_dir as a soft link to src_dir, for detail please refer to:
28 # http://www.scons.org/doc/production/HTML/scons-user.html#f-VariantDir
30 # Any way, to make the output is in build_dir, when load scripts, the path should
31 # be relevant to build_dir.
32 build_dir = env.get('BUILD_DIR')
34 # Build 'resource' sub-project
35 SConscript(os.path.join(build_dir, 'resource', 'SConscript'))
37 # Build 'service' sub-project
38 SConscript(os.path.join(build_dir, 'service', 'SConscript'))
40 # Append targets information to the help information, to see help info, execute command line:
44 # Print bin upload command line (arduino only)
45 if target_os == 'arduino':