mirror of https://github.com/commaai/openpilot.git
parent
0bd9df3193
commit
fb804c9529
52
SConstruct
52
SConstruct
|
@ -244,18 +244,6 @@ def progress_function(node):
|
||||||
if os.environ.get('SCONS_PROGRESS'):
|
if os.environ.get('SCONS_PROGRESS'):
|
||||||
Progress(progress_function, interval=node_interval)
|
Progress(progress_function, interval=node_interval)
|
||||||
|
|
||||||
SHARED = False
|
|
||||||
|
|
||||||
# TODO: this can probably be removed
|
|
||||||
def abspath(x):
|
|
||||||
if arch == 'aarch64':
|
|
||||||
pth = os.path.join("/data/pythonpath", x[0].path)
|
|
||||||
env.Depends(pth, x)
|
|
||||||
return File(pth)
|
|
||||||
else:
|
|
||||||
# rpath works elsewhere
|
|
||||||
return x[0].path.rsplit("/", 1)[1][:-3]
|
|
||||||
|
|
||||||
# Cython build environment
|
# Cython build environment
|
||||||
py_include = sysconfig.get_paths()['include']
|
py_include = sysconfig.get_paths()['include']
|
||||||
envCython = env.Clone()
|
envCython = env.Clone()
|
||||||
|
@ -337,34 +325,35 @@ if GetOption("clazy"):
|
||||||
qt_env['ENV']['CLAZY_IGNORE_DIRS'] = qt_dirs[0]
|
qt_env['ENV']['CLAZY_IGNORE_DIRS'] = qt_dirs[0]
|
||||||
qt_env['ENV']['CLAZY_CHECKS'] = ','.join(checks)
|
qt_env['ENV']['CLAZY_CHECKS'] = ','.join(checks)
|
||||||
|
|
||||||
Export('env', 'qt_env', 'arch', 'real_arch', 'SHARED')
|
Export('env', 'qt_env', 'arch', 'real_arch')
|
||||||
|
|
||||||
|
# Build common module
|
||||||
SConscript(['common/SConscript'])
|
SConscript(['common/SConscript'])
|
||||||
Import('_common', '_gpucommon')
|
Import('_common', '_gpucommon')
|
||||||
|
|
||||||
if SHARED:
|
common = [_common, 'json11']
|
||||||
common, gpucommon = abspath(common), abspath(gpucommon)
|
gpucommon = [_gpucommon]
|
||||||
else:
|
|
||||||
common = [_common, 'json11']
|
|
||||||
gpucommon = [_gpucommon]
|
|
||||||
|
|
||||||
Export('common', 'gpucommon')
|
Export('common', 'gpucommon')
|
||||||
|
|
||||||
# cereal and messaging are shared with the system
|
# Build cereal and messaging
|
||||||
SConscript(['cereal/SConscript'])
|
SConscript(['cereal/SConscript'])
|
||||||
if SHARED:
|
|
||||||
cereal = abspath([File('cereal/libcereal_shared.so')])
|
cereal = [File('#cereal/libcereal.a')]
|
||||||
messaging = abspath([File('cereal/libmessaging_shared.so')])
|
messaging = [File('#cereal/libmessaging.a')]
|
||||||
else:
|
visionipc = [File('#cereal/libvisionipc.a')]
|
||||||
cereal = [File('#cereal/libcereal.a')]
|
|
||||||
messaging = [File('#cereal/libmessaging.a')]
|
|
||||||
visionipc = [File('#cereal/libvisionipc.a')]
|
|
||||||
messaging_python = [File('#cereal/messaging/messaging_pyx.so')]
|
messaging_python = [File('#cereal/messaging/messaging_pyx.so')]
|
||||||
|
|
||||||
Export('cereal', 'messaging', 'messaging_python', 'visionipc')
|
Export('cereal', 'messaging', 'messaging_python', 'visionipc')
|
||||||
|
|
||||||
# Build rednose library and ekf models
|
# Build other submodules
|
||||||
|
SConscript([
|
||||||
|
'body/board/SConscript',
|
||||||
|
'opendbc/can/SConscript',
|
||||||
|
'panda/SConscript',
|
||||||
|
])
|
||||||
|
|
||||||
|
# Build rednose library and ekf models
|
||||||
rednose_deps = [
|
rednose_deps = [
|
||||||
"#selfdrive/locationd/models/constants.py",
|
"#selfdrive/locationd/models/constants.py",
|
||||||
"#selfdrive/locationd/models/gnss_helpers.py",
|
"#selfdrive/locationd/models/gnss_helpers.py",
|
||||||
|
@ -406,15 +395,6 @@ if arch != "Darwin":
|
||||||
])
|
])
|
||||||
|
|
||||||
# Build openpilot
|
# Build openpilot
|
||||||
|
|
||||||
# build submodules
|
|
||||||
SConscript([
|
|
||||||
'body/board/SConscript',
|
|
||||||
'cereal/SConscript',
|
|
||||||
'opendbc/can/SConscript',
|
|
||||||
'panda/SConscript',
|
|
||||||
])
|
|
||||||
|
|
||||||
SConscript(['third_party/SConscript'])
|
SConscript(['third_party/SConscript'])
|
||||||
|
|
||||||
SConscript(['selfdrive/boardd/SConscript'])
|
SConscript(['selfdrive/boardd/SConscript'])
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
Import('env', 'envCython', 'arch', 'SHARED')
|
Import('env', 'envCython', 'arch')
|
||||||
|
|
||||||
if SHARED:
|
|
||||||
fxn = env.SharedLibrary
|
|
||||||
else:
|
|
||||||
fxn = env.Library
|
|
||||||
|
|
||||||
common_libs = [
|
common_libs = [
|
||||||
'params.cc',
|
'params.cc',
|
||||||
|
@ -18,13 +13,13 @@ common_libs = [
|
||||||
if arch != "Darwin":
|
if arch != "Darwin":
|
||||||
common_libs.append('gpio.cc')
|
common_libs.append('gpio.cc')
|
||||||
|
|
||||||
_common = fxn('common', common_libs, LIBS="json11")
|
_common = env.Library('common', common_libs, LIBS="json11")
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'clutil.cc',
|
'clutil.cc',
|
||||||
]
|
]
|
||||||
|
|
||||||
_gpucommon = fxn('gpucommon', files)
|
_gpucommon = env.Library('gpucommon', files)
|
||||||
Export('_common', '_gpucommon')
|
Export('_common', '_gpucommon')
|
||||||
|
|
||||||
if GetOption('extras'):
|
if GetOption('extras'):
|
||||||
|
|
Loading…
Reference in New Issue