2020-03-12 16:46:38 -06:00
|
|
|
Import('env', 'arch')
|
2020-02-12 10:40:28 -07:00
|
|
|
|
|
|
|
templates = Glob('templates/*')
|
|
|
|
sympy_helpers = "helpers/sympy_helpers.py"
|
|
|
|
ekf_sym = "helpers/ekf_sym.py"
|
|
|
|
|
|
|
|
to_build = {
|
2020-02-26 17:19:02 -07:00
|
|
|
'car': 'models/car_kf.py',
|
2020-02-12 10:40:28 -07:00
|
|
|
'live': 'models/live_kf.py',
|
|
|
|
}
|
|
|
|
|
2020-03-12 16:46:38 -06:00
|
|
|
|
|
|
|
if arch != "aarch64":
|
|
|
|
to_build.update({
|
2020-03-26 18:25:21 -06:00
|
|
|
'lane': '#xx/pipeline/lib/ekf/lane_kf.py',
|
2020-03-12 16:46:38 -06:00
|
|
|
'pos_computer_4': 'helpers/lst_sq_computer.py',
|
|
|
|
'pos_computer_5': 'helpers/lst_sq_computer.py',
|
|
|
|
'feature_handler_5': 'helpers/feature_handler.py',
|
|
|
|
'loc_4': 'models/loc_kf.py',
|
|
|
|
'gnss': 'models/gnss_kf.py',
|
|
|
|
})
|
|
|
|
|
2020-02-12 10:40:28 -07:00
|
|
|
found = {}
|
|
|
|
|
|
|
|
for target, command in to_build.items():
|
|
|
|
if File(command).exists():
|
|
|
|
found[target] = command
|
|
|
|
|
|
|
|
for target, command in found.items():
|
|
|
|
target_files = File([f'generated/{target}.cpp', f'generated/{target}.h'])
|
|
|
|
command_file = File(command)
|
|
|
|
env.Command(target_files,
|
|
|
|
[templates, command_file, sympy_helpers, ekf_sym],
|
2020-02-13 17:13:05 -07:00
|
|
|
command_file.get_abspath()+" "+target
|
2020-02-12 10:40:28 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
env.SharedLibrary('generated/' + target, target_files[0])
|