mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-22 23:33:53 +08:00
* Update ref * Compiles * compiles * Refactor rest of libs * import all * small fiex * cleanup import * Need msgq simlink too * Add to openpilot docker too * try repo * Updates * Fix lint * fix docs * Try blank slate * Revert "Try blank slate" This reverts commit f078ce04acacfe115c19e23e86038b01e2b84a6d. * Maybe scons needs this to clear cache * fix tests * Disable test for now * Update SConstruct Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Fix whitespace * Write skip normal * small fixes * add test path * Revert repo * linting * whitespace * Bump msgq --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
20 lines
995 B
Python
20 lines
995 B
Python
Import('env', 'common', 'messaging')
|
|
|
|
loc_libs = [messaging, common, 'kaitai', 'pthread']
|
|
|
|
if GetOption('kaitai'):
|
|
generated = Dir('generated').srcnode().abspath
|
|
cmd = f"kaitai-struct-compiler --target cpp_stl --outdir {generated} $SOURCES"
|
|
env.Command(['generated/ubx.cpp', 'generated/ubx.h'], 'ubx.ksy', cmd)
|
|
env.Command(['generated/gps.cpp', 'generated/gps.h'], 'gps.ksy', cmd)
|
|
glonass = env.Command(['generated/glonass.cpp', 'generated/glonass.h'], 'glonass.ksy', cmd)
|
|
|
|
# kaitai issue: https://github.com/kaitai-io/kaitai_struct/issues/910
|
|
patch = env.Command(None, 'glonass_fix.patch', 'git apply $SOURCES')
|
|
env.Depends(patch, glonass)
|
|
|
|
glonass_obj = env.Object('generated/glonass.cpp')
|
|
env.Program("ubloxd", ["ubloxd.cc", "ublox_msg.cc", "generated/ubx.cpp", "generated/gps.cpp", glonass_obj], LIBS=loc_libs)
|
|
|
|
if GetOption('extras'):
|
|
env.Program("tests/test_glonass_runner", ['tests/test_glonass_runner.cc', 'tests/test_glonass_kaitai.cc', glonass_obj], LIBS=[loc_libs]) |