Skip to content

Commit

Permalink
update scons build file
Browse files Browse the repository at this point in the history
  • Loading branch information
Comma Device committed Nov 13, 2019
1 parent 93d814e commit 7fd314a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ package-lock.json
*.pyc
__pycache__
.*.swp
.*.swo
libcereal*.a
libmessaging.a

20 changes: 20 additions & 0 deletions SConscript
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
Import('env')

# 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(
['gen/c/car.capnp.c', 'gen/c/log.capnp.c'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c:cereal/gen/c/')
env.Command(
['gen/cpp/car.capnp.c++', 'gen/cpp/log.capnp.c++'],
['car.capnp', 'log.capnp'],
'capnpc $SOURCES --src-prefix=cereal -o c++:cereal/gen/cpp/')

env.Library('cereal', [
'gen/c/car.capnp.c',
'gen/c/log.capnp.c',
'gen/cpp/car.capnp.c++',
'gen/cpp/log.capnp.c++',
])

env.Library('messaging', [
'messaging/messaging.cc',
'messaging/impl_zmq.cc',
'messaging/impl_msgq.cc',
'messaging/msgq.cc',
])

env.Program('messaging/bridge', ['messaging/bridge.cc'], LIBS=['messaging', 'yaml-cpp', 'zmq'])


0 comments on commit 7fd314a

Please sign in to comment.