mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 17:43:54 +08:00
Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common
* fix that
* fix version
* fix unit tests
old-commit-hash: cb8885cffb
This commit is contained in:
@@ -1,4 +1,39 @@
|
||||
Import('envCython', 'common')
|
||||
Import('env', 'envCython', 'arch', 'SHARED')
|
||||
|
||||
if SHARED:
|
||||
fxn = env.SharedLibrary
|
||||
else:
|
||||
fxn = env.Library
|
||||
|
||||
common_libs = [
|
||||
'params.cc',
|
||||
'statlog.cc',
|
||||
'swaglog.cc',
|
||||
'util.cc',
|
||||
'gpio.cc',
|
||||
'i2c.cc',
|
||||
'watchdog.cc',
|
||||
]
|
||||
|
||||
_common = fxn('common', common_libs, LIBS="json11")
|
||||
|
||||
files = [
|
||||
'clutil.cc',
|
||||
'visionimg.cc',
|
||||
]
|
||||
|
||||
if arch == "larch64":
|
||||
_gpu_libs = ["GLESv2"]
|
||||
else:
|
||||
_gpu_libs = ["GL"]
|
||||
|
||||
_gpucommon = fxn('gpucommon', files, LIBS=_gpu_libs)
|
||||
Export('_common', '_gpucommon', '_gpu_libs')
|
||||
|
||||
if GetOption('test'):
|
||||
env.Program('tests/test_util', ['tests/test_util.cc'], LIBS=[_common])
|
||||
env.Program('tests/test_swaglog', ['tests/test_swaglog.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread'])
|
||||
|
||||
# Cython
|
||||
envCython.Program('clock.so', 'clock.pyx')
|
||||
envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [common, 'zmq'])
|
||||
envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11'])
|
||||
|
||||
Reference in New Issue
Block a user