SConscript 900 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. Import('env', 'envCython', 'arch')
  2. common_libs = [
  3. 'params.cc',
  4. 'swaglog.cc',
  5. 'util.cc',
  6. 'i2c.cc',
  7. 'watchdog.cc',
  8. 'ratekeeper.cc'
  9. ]
  10. if arch != "Darwin":
  11. common_libs.append('gpio.cc')
  12. _common = env.Library('common', common_libs, LIBS="json11")
  13. files = [
  14. 'clutil.cc',
  15. ]
  16. _gpucommon = env.Library('gpucommon', files)
  17. Export('_common', '_gpucommon')
  18. if GetOption('extras'):
  19. env.Program('tests/test_common',
  20. ['tests/test_runner.cc', 'tests/test_params.cc', 'tests/test_util.cc', 'tests/test_swaglog.cc'],
  21. LIBS=[_common, 'json11', 'zmq', 'pthread'])
  22. # Cython bindings
  23. params_python = envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11'])
  24. SConscript([
  25. 'transformations/SConscript',
  26. ])
  27. Import('transformations_python')
  28. common_python = [params_python, transformations_python]
  29. Export('common_python')