cereal/SConscript

47 lines
1.5 KiB
Python
Raw Normal View History

2019-11-12 08:49:08 +08:00
Import('env')
2019-11-14 02:01:01 +08:00
# TODO: remove src-prefix and cereal from command string. can we set working directory?
env.Command(["gen/c/include/c++.capnp.h", "gen/c/include/java.capnp.h"], [], "mkdir -p cereal/gen/c/include && touch $TARGETS")
env.Command(
2019-11-15 05:50:12 +08:00
['gen/c/car.capnp.c', 'gen/c/log.capnp.c', 'gen/c/car.capnp.h', 'gen/c/log.capnp.h'],
2019-11-14 02:01:01 +08:00
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c:cereal/gen/c/')
env.Command(
2019-11-15 05:50:12 +08:00
['gen/cpp/car.capnp.c++', 'gen/cpp/log.capnp.c++', 'gen/cpp/car.capnp.h', 'gen/cpp/log.capnp.h'],
2019-11-14 02:01:01 +08:00
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c++:cereal/gen/cpp/')
2019-11-12 08:49:08 +08:00
env.Library('cereal', [
'gen/c/car.capnp.c',
'gen/c/log.capnp.c',
'gen/cpp/car.capnp.c++',
'gen/cpp/log.capnp.c++',
])
2019-11-21 00:33:24 +08:00
env.Command(
['services.h'],
['service_list.yaml', 'services.py'],
'python3 cereal/services.py > $TARGET')
2019-11-21 01:44:47 +08:00
messaging_deps = [
'messaging/messaging.cc',
'messaging/impl_zmq.cc',
'messaging/impl_msgq.cc',
'messaging/msgq.cc',
]
messaging_lib = env.Library('messaging', messaging_deps)
# note, this rebuilds the deps shared
2019-11-21 01:54:48 +08:00
env.SharedLibrary('messaging_shared', messaging_deps)
2019-11-21 01:44:47 +08:00
env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=['messaging', 'zmq'])
# different target?
#env.Program('messaging/demo', ['messaging/demo.cc'], LIBS=['messaging', 'zmq'])
env.Command(['messaging/messaging_pyx.so'],
[messaging_lib, 'messaging/messaging_pyx_setup.py', 'messaging/messaging_pyx.pyx', 'messaging/messaging.pxd'],
"cd cereal/messaging && python3 messaging_pyx_setup.py build_ext --inplace")