SConscript 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. from building import *
  2. Import('rtconfig')
  3. src = []
  4. cwd = GetCurrentDir()
  5. group = []
  6. CPPPATH = []
  7. # add kernel samples.
  8. if GetDepend('RT_USING_SAMPLE_THREAD'):
  9. src += ['thread/thread_sample.c']
  10. CPPPATH += [cwd + '/thread']
  11. if GetDepend('RT_USING_SAMPLE_SEMAPHORE'):
  12. src += ['semaphore/semaphore_sample.c']
  13. src += ['semaphore/producer_consumer.c']
  14. CPPPATH += [cwd + '/semaphore']
  15. if GetDepend('RT_USING_SAMPLE_MUTEX'):
  16. src += ['mutex/mutex_sample.c']
  17. src += ['mutex/pri_inversion.c']
  18. CPPPATH += [cwd + '/mutex']
  19. if GetDepend('RT_USING_SAMPLE_MAILBOX'):
  20. src += ['mailbox/mailbox_sample.c']
  21. CPPPATH += [cwd + '/mailbox']
  22. if GetDepend('RT_USING_SAMPLE_EVENT'):
  23. src += ['event/event_sample.c']
  24. CPPPATH += [cwd + '/event']
  25. if GetDepend('RT_USING_SAMPLE_MESSAGEQUEUE'):
  26. src += ['msgq/msgq_sample.c']
  27. CPPPATH += [cwd + '/msgq']
  28. if GetDepend('RT_USING_SAMPLE_TIMER'):
  29. src += ['timer/timer_sample.c']
  30. CPPPATH += [cwd + '/timer']
  31. if GetDepend('RT_USING_SAMPLE_HEAP'):
  32. src += ['dynmem/dynmem_sample.c']
  33. CPPPATH += [cwd + '/dynmem']
  34. if GetDepend('RT_USING_SAMPLE_MEMPOOL'):
  35. src += ['mempool/memp_sample.c']
  36. CPPPATH += [cwd + '/mempool']
  37. if GetDepend('RT_USING_SAMPLE_IDLEHOOK'):
  38. src += ['idlehook/idlehook_sample.c']
  39. CPPPATH += [cwd + '/idlehook']
  40. if GetDepend('RT_USING_SAMPLE_SIGNAL'):
  41. src += ['signal/signal_sample.c']
  42. CPPPATH += [cwd + '/signal']
  43. group = DefineGroup('samples', src, depend = [''], CPPPATH = CPPPATH)
  44. Return('group')