Files
sunnypilot/selfdrive/common/SConscript

37 lines
739 B
Python
Raw Normal View History

Import('env', 'arch', 'SHARED')
2020-01-17 11:01:02 -08:00
if SHARED:
fxn = env.SharedLibrary
else:
fxn = env.Library
common_libs = [
'params.cc',
'swaglog.cc',
'util.cc',
'gpio.cc',
'i2c.cc',
'watchdog.cc',
]
_common = fxn('common', common_libs, LIBS="json11")
2020-01-17 11:01:02 -08:00
files = [
'clutil.cc',
2020-01-17 11:01:02 -08:00
'visionimg.cc',
]
if arch == "aarch64":
_gpu_libs = ['gui', 'adreno_utils']
elif arch == "larch64":
_gpu_libs = ["GLESv2"]
2020-01-17 11:01:02 -08:00
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'])