mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-07-26 03:42:05 +08:00
3cd55260d9
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b * bump opendbc * bump opendbc * bump opendbc * bump opendbc * bump opendbc * sunnypilot: remove Qt * cabana: revert to stock Qt * commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9 * commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e * commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e * sum more * bump opendbc * not yet * should've been symlink'ed * raylib says wut * quiet mode back * more fixes * no more * too extra red diff on the side * need to bring this back * too extra * let's update docs here * Revert "let's update docs here" This reverts commit 51fe03cd5121e6fdf14657b2c33852c34922b851. * del snpe * reset min for safety catch as we killed snpe * uhhh --------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
45 lines
1.6 KiB
Python
45 lines
1.6 KiB
Python
Import('env', 'envCython', 'arch', 'cereal', 'messaging', 'common', 'visionipc', 'transformations')
|
|
lenv = env.Clone()
|
|
lenvCython = envCython.Clone()
|
|
|
|
libs = [cereal, messaging, visionipc, common, 'capnp', 'kj', 'pthread']
|
|
frameworks = []
|
|
|
|
common_src = [
|
|
"models/commonmodel.cc",
|
|
"transforms/loadyuv.cc",
|
|
"transforms/transform.cc",
|
|
]
|
|
|
|
thneed_src_common = [
|
|
"thneed/clutil_legacy.cc",
|
|
"thneed/thneed_common.cc",
|
|
"thneed/serialize.cc",
|
|
]
|
|
|
|
thneed_src_qcom = thneed_src_common + ["thneed/thneed_qcom2.cc"]
|
|
thneed_src_pc = thneed_src_common + ["thneed/thneed_pc.cc"]
|
|
thneed_src = thneed_src_qcom if arch == "larch64" else thneed_src_pc
|
|
|
|
# OpenCL is a framework on Mac
|
|
if arch == "Darwin":
|
|
frameworks += ['OpenCL']
|
|
else:
|
|
libs += ['OpenCL']
|
|
|
|
# Set path definitions
|
|
for pathdef, fn in {'TRANSFORM': 'transforms/transform.cl', 'LOADYUV': 'transforms/loadyuv.cl'}.items():
|
|
for xenv in (lenv, lenvCython):
|
|
xenv['CXXFLAGS'].append(f'-D{pathdef}_PATH=\\"{File(fn).abspath}\\"')
|
|
|
|
cython_libs = envCython["LIBS"] + libs
|
|
commonmodel_lib = lenv.Library('commonmodel', common_src)
|
|
|
|
lenvCython.Program('runners/runmodel_pyx.so', 'runners/runmodel_pyx.pyx', LIBS=cython_libs, FRAMEWORKS=frameworks)
|
|
lenvCython.Program('models/commonmodel_pyx.so', 'models/commonmodel_pyx.pyx', LIBS=[commonmodel_lib, *cython_libs], FRAMEWORKS=frameworks)
|
|
|
|
if arch == "larch64":
|
|
thneed_lib = env.SharedLibrary('thneed', thneed_src, LIBS=[common, 'OpenCL', 'dl'])
|
|
thneedmodel_lib = env.Library('thneedmodel', ['runners/thneedmodel.cc'])
|
|
lenvCython.Program('runners/thneedmodel_pyx.so', 'runners/thneedmodel_pyx.pyx', LIBS=envCython["LIBS"]+[thneedmodel_lib, thneed_lib, common, 'dl', 'OpenCL'])
|