mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-19 00:02:08 +08:00
bcd4bb4821
date: 2023-02-17T21:02:50 master commit: 89f68bf0cbf53a81b0553d3816fdbe522f941fa1
36 lines
784 B
Python
36 lines
784 B
Python
Import('env', 'envCython', 'arch', 'SHARED')
|
|
|
|
if SHARED:
|
|
fxn = env.SharedLibrary
|
|
else:
|
|
fxn = env.Library
|
|
|
|
common_libs = [
|
|
'params.cc',
|
|
'statlog.cc',
|
|
'swaglog.cc',
|
|
'util.cc',
|
|
'i2c.cc',
|
|
'watchdog.cc',
|
|
]
|
|
|
|
if arch != "Darwin":
|
|
common_libs.append('gpio.cc')
|
|
|
|
_common = fxn('common', common_libs, LIBS="json11")
|
|
|
|
files = [
|
|
'clutil.cc',
|
|
]
|
|
|
|
_gpucommon = fxn('gpucommon', files)
|
|
Export('_common', '_gpucommon')
|
|
|
|
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', 'json11'])
|