SConscript 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. from building import *
  2. import rtconfig
  3. # get current directory
  4. cwd = GetCurrentDir()
  5. # The set of source files associated with this SConscript file.
  6. src = Glob('src/*.cpp')
  7. path = [cwd + '/']
  8. path += [cwd + '/port']
  9. path += [cwd + '/src']
  10. LOCAL_CCFLAGS = ''
  11. if GetDepend('ROSSERIAL_USING_HELLO_WORLD_UART'):
  12. src += Glob('examples/hello_world_serial.cpp')
  13. if GetDepend('ROSSERIAL_USING_BLINK_UART'):
  14. src += Glob('examples/blink.cpp')
  15. if GetDepend('ROSSERIAL_USING_BLINK_CLASS_UART'):
  16. src += Glob('examples/blink_class.cpp')
  17. if GetDepend('ROSSERIAL_USING_BUTTON_UART'):
  18. src += Glob('examples/button.cpp')
  19. if GetDepend('ROSSERIAL_USING_PUB_SUB_UART'):
  20. src += Glob('examples/pubsub.cpp')
  21. if GetDepend('ROSSERIAL_USING_LOGGING_UART'):
  22. src += Glob('examples/logging.cpp')
  23. if GetDepend('ROSSERIAL_USING_TF_UART'):
  24. src += Glob('examples/tf.cpp')
  25. if GetDepend('ROSSERIAL_USING_SERVICE_SERVER_UART'):
  26. src += Glob('examples/service_server.cpp')
  27. if GetDepend('ROSSERIAL_USING_SERVICE_CLIENT_UART'):
  28. src += Glob('examples/service_client.cpp')
  29. if GetDepend('ROSSERIAL_USING_HELLO_WORLD_TCP'):
  30. src += Glob('examples/hello_world_tcp.cpp')
  31. if GetDepend('ROSSERIAL_USING_KOBUKI_CONTROL'):
  32. src += Glob('examples/kobuki_control.cpp')
  33. if rtconfig.CROSS_TOOL == 'gcc':
  34. LOCAL_CCFLAGS += ' -std=c99'
  35. group = DefineGroup('rosserial', src, depend = ['PKG_USING_ROSSERIAL'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  36. Return('group')