SConscript 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. from building import *
  2. src = []
  3. cwd = GetCurrentDir()
  4. include_path = [cwd]
  5. # add kernel samples.
  6. if GetDepend('KERNEL_SAMPLES_USING_THREAD'):
  7. src += ['thread_sample.c']
  8. if GetDepend('KERNEL_SAMPLES_USING_SEMAPHORE'):
  9. src += ['semaphore_sample.c']
  10. if GetDepend('KERNEL_SAMPLES_USING_MUTEX'):
  11. src += ['mutex_sample.c']
  12. if GetDepend('KERNEL_SAMPLES_USING_MAILBOX'):
  13. src += ['mailbox_sample.c']
  14. if GetDepend('KERNEL_SAMPLES_USING_EVENT'):
  15. src += ['event_sample.c']
  16. if GetDepend('KERNEL_SAMPLES_USING_MESSAGEQUEUE'):
  17. src += ['msgq_sample.c']
  18. if GetDepend('KERNEL_SAMPLES_USING_TIMER'):
  19. src += ['timer_sample.c']
  20. if GetDepend('KERNEL_SAMPLES_USING_HEAP'):
  21. src += ['dynmem_sample.c']
  22. if GetDepend('KERNEL_SAMPLES_USING_MEMPOOL'):
  23. src += ['memp_sample.c']
  24. if GetDepend('KERNEL_SAMPLES_USING_IDLEHOOK'):
  25. src += ['idlehook_sample.c']
  26. if GetDepend('KERNEL_SAMPLES_USING_SIGNAL'):
  27. src += ['signal_sample.c']
  28. if GetDepend('KERNEL_SAMPLES_USING_INTERRUPT'):
  29. src += ['interrupt_sample.c']
  30. if GetDepend('KERNEL_SAMPLES_USING_PRI_INVERSION'):
  31. src += ['priority_inversion.c']
  32. if GetDepend('KERNEL_SAMPLES_USING_TIME_SLICE'):
  33. src += ['timeslice_sample.c']
  34. if GetDepend('KERNEL_SAMPLES_USING_SCHEDULER_HOOK'):
  35. src += ['scheduler_hook.c']
  36. group = DefineGroup('kernel-samples', src, depend = ['PKG_USING_KERNEL_SAMPLES'], CPPPATH = include_path)
  37. Return('group')