mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 05:24:06 +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>
old-commit-hash: e70dc90a45
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
Import('env', 'envCython', 'arch', 'common', 'msgq')
|
|
|
|
import shutil
|
|
|
|
cereal_dir = Dir('.')
|
|
gen_dir = Dir('gen')
|
|
other_dir = Dir('#msgq')
|
|
|
|
# Build cereal
|
|
schema_files = ['log.capnp', 'car.capnp', 'legacy.capnp', 'custom.capnp']
|
|
env.Command(["gen/c/include/c++.capnp.h"], [], "mkdir -p " + gen_dir.path + "/c/include && touch $TARGETS")
|
|
env.Command([f'gen/cpp/{s}.c++' for s in schema_files] + [f'gen/cpp/{s}.h' for s in schema_files],
|
|
schema_files,
|
|
f"capnpc --src-prefix={cereal_dir.path} $SOURCES -o c++:{gen_dir.path}/cpp/")
|
|
|
|
# TODO: remove non shared cereal and messaging
|
|
cereal_objects = env.SharedObject([f'gen/cpp/{s}.c++' for s in schema_files])
|
|
|
|
cereal = env.Library('cereal', cereal_objects)
|
|
env.SharedLibrary('cereal_shared', cereal_objects)
|
|
|
|
# Build messaging
|
|
|
|
services_h = env.Command(['services.h'], ['services.py'], 'python3 ' + cereal_dir.path + '/services.py > $TARGET')
|
|
env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=[msgq, 'zmq', common])
|
|
|
|
|
|
socketmaster = env.SharedObject(['messaging/socketmaster.cc'])
|
|
socketmaster = env.Library('socketmaster', socketmaster)
|
|
|
|
Export('cereal', 'socketmaster')
|