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