SConscript 772 B

12345678910111213141516171819202122232425262728293031
  1. from building import *
  2. cwd = GetCurrentDir()
  3. src = Glob('src/morse.c')
  4. CPPPATH = [cwd + '/inc']
  5. if GetDepend(['PKG_USING_MORSE_SHELL']):
  6. src += Split("""
  7. src/morse_shell.c
  8. """)
  9. if GetDepend(['PKG_USING_MORSE_SAMPLE']):
  10. if GetDepend(['PKG_USING_MORSE_KEY_SAMPLE']):
  11. src += Split("""
  12. samples/key/morse-key-example.c
  13. """)
  14. if GetDepend(['PKG_USING_MORSE_TPAD_SAMPLE']):
  15. CPPPATH += [cwd + '/samples/tpad']
  16. src += Split("""
  17. samples/tpad/tpad.c
  18. samples/tpad/morse-tpad-example.c
  19. """)
  20. if GetDepend(['PKG_USING_MORSE_SLIDER_SAMPLE']):
  21. CPPPATH += [cwd + '/samples/slider']
  22. src += Split("""
  23. samples/slider/morse-slider-example.c
  24. """)
  25. group = DefineGroup('morse', src, depend = ['PKG_USING_MORSE'], CPPPATH = CPPPATH)
  26. Return('group')