2023-09-14 05:39:06 +08:00
|
|
|
Import('env', 'envCython', 'arch')
|
2022-05-19 05:11:57 +08:00
|
|
|
|
|
|
|
common_libs = [
|
|
|
|
'params.cc',
|
|
|
|
'swaglog.cc',
|
|
|
|
'util.cc',
|
|
|
|
'i2c.cc',
|
|
|
|
'watchdog.cc',
|
2023-08-21 12:27:02 +08:00
|
|
|
'ratekeeper.cc'
|
2022-05-19 05:11:57 +08:00
|
|
|
]
|
|
|
|
|
2023-01-30 05:55:17 +08:00
|
|
|
if arch != "Darwin":
|
|
|
|
common_libs.append('gpio.cc')
|
|
|
|
|
2024-01-23 14:41:59 +08:00
|
|
|
_common = env.Library('common', common_libs, LIBS="json11")
|
2022-05-19 05:11:57 +08:00
|
|
|
|
|
|
|
files = [
|
|
|
|
'clutil.cc',
|
|
|
|
]
|
|
|
|
|
2023-09-14 05:39:06 +08:00
|
|
|
_gpucommon = env.Library('gpucommon', files)
|
2022-05-23 19:46:48 +08:00
|
|
|
Export('_common', '_gpucommon')
|
2022-05-19 05:11:57 +08:00
|
|
|
|
2023-08-25 05:58:30 +08:00
|
|
|
if GetOption('extras'):
|
2023-08-26 01:35:39 +08:00
|
|
|
env.Program('tests/test_common',
|
2024-01-22 06:49:57 +08:00
|
|
|
['tests/test_runner.cc', 'tests/test_params.cc', 'tests/test_util.cc', 'tests/test_swaglog.cc'],
|
2024-01-23 14:41:59 +08:00
|
|
|
LIBS=[_common, 'json11', 'zmq', 'pthread'])
|
2022-05-19 05:11:57 +08:00
|
|
|
|
2023-08-31 06:01:03 +08:00
|
|
|
# Cython bindings
|
2024-01-23 14:41:59 +08:00
|
|
|
params_python = envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11'])
|
2023-08-31 06:01:03 +08:00
|
|
|
|
|
|
|
SConscript([
|
2023-12-17 15:45:28 +08:00
|
|
|
'transformations/SConscript',
|
2023-08-31 06:01:03 +08:00
|
|
|
])
|
|
|
|
|
2023-12-17 15:45:28 +08:00
|
|
|
Import('transformations_python')
|
|
|
|
common_python = [params_python, transformations_python]
|
2023-08-31 06:01:03 +08:00
|
|
|
|
|
|
|
Export('common_python')
|