SConscript 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. from building import *
  2. Import('rtconfig')
  3. src = []
  4. cwd = GetCurrentDir()
  5. group = []
  6. CPPPATH = []
  7. # add kernel samples.
  8. if GetDepend('KERNEL_SAMPLES_USING_THREAD'):
  9. src += Glob('thread/*.c')
  10. CPPPATH += [cwd + '/thread']
  11. if GetDepend('KERNEL_SAMPLES_USING_SEMAPHORE'):
  12. src += Glob('semaphore/*.c')
  13. CPPPATH += [cwd + '/semaphore']
  14. if GetDepend('KERNEL_SAMPLES_USING_MUTEX'):
  15. src += Glob('mutex/*.c')
  16. CPPPATH += [cwd + '/mutex']
  17. if GetDepend('KERNEL_SAMPLES_USING_MAILBOX'):
  18. src += Glob('mailbox/*.c')
  19. CPPPATH += [cwd + '/mailbox']
  20. if GetDepend('KERNEL_SAMPLES_USING_EVENT'):
  21. src += Glob('event/*.c')
  22. CPPPATH += [cwd + '/event']
  23. if GetDepend('KERNEL_SAMPLES_USING_MESSAGEQUEUE'):
  24. src += Glob('msgq/*.c')
  25. CPPPATH += [cwd + '/msgq']
  26. if GetDepend('KERNEL_SAMPLES_USING_TIMER'):
  27. src += Glob('timer/*.c')
  28. CPPPATH += [cwd + '/timer']
  29. if GetDepend('KERNEL_SAMPLES_USING_HEAP'):
  30. src += Glob('dynmem/*.c')
  31. CPPPATH += [cwd + '/dynmem']
  32. if GetDepend('KERNEL_SAMPLES_USING_MEMPOOL'):
  33. src += Glob('mempool/*.c')
  34. CPPPATH += [cwd + '/mempool']
  35. if GetDepend('KERNEL_SAMPLES_USING_IDLEHOOK'):
  36. src += Glob('idlehook/*.c')
  37. CPPPATH += [cwd + '/idlehook']
  38. if GetDepend('KERNEL_SAMPLES_USING_SIGNAL'):
  39. src += Glob('signal/*.c')
  40. CPPPATH += [cwd + '/signal']
  41. if GetDepend('KERNEL_SAMPLES_USING_INTERRUPT'):
  42. src += Glob('interrupt/*.c')
  43. CPPPATH += [cwd + '/interrupt']
  44. group = DefineGroup('kernel-samples', src, depend = ['PKG_USING_KERNEL_SAMPLES'], CPPPATH = CPPPATH)
  45. Return('group')