misonyo 7 лет назад
Родитель
Сommit
d3fb880b57
17 измененных файлов с 24 добавлено и 30 удалено
  1. 24 30
      SConscript
  2. 0 0
      dynmem_sample.c
  3. 0 0
      event_sample.c
  4. 0 0
      idlehook_sample.c
  5. 0 0
      interrupt_sample.c
  6. 0 0
      mailbox_sample.c
  7. 0 0
      memp_sample.c
  8. 0 0
      msgq_sample.c
  9. 0 0
      mutex_sample.c
  10. 0 0
      priority_inversion.c
  11. 0 0
      producer_consumer.c
  12. 0 0
      scheduler_hook.c
  13. 0 0
      semaphore_sample.c
  14. 0 0
      signal_sample.c
  15. 0 0
      thread_sample.c
  16. 0 0
      timer_sample.c
  17. 0 0
      timeslice_sample.c

+ 24 - 30
SConscript

@@ -1,61 +1,55 @@
-
 from building import *
-Import('rtconfig')
 
 src   = []
 cwd   = GetCurrentDir()
-group = []
-CPPPATH = []
+include_path = [cwd]
 
 # add kernel samples.
 if GetDepend('KERNEL_SAMPLES_USING_THREAD'):
-    src += Glob('thread/*.c')
-    CPPPATH += [cwd + '/thread']
+    src += ['thread_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_SEMAPHORE'):
-    src += Glob('semaphore/*.c')
-    CPPPATH += [cwd + '/semaphore']
+    src += ['semaphore_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_MUTEX'):
-    src += Glob('mutex/*.c')
-    CPPPATH += [cwd + '/mutex']
+    src += ['mutex_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_MAILBOX'):
-    src += Glob('mailbox/*.c')
-    CPPPATH += [cwd + '/mailbox']
+    src += ['mailbox_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_EVENT'):
-    src += Glob('event/*.c')
-    CPPPATH += [cwd + '/event']
+    src += ['event_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_MESSAGEQUEUE'):
-    src += Glob('msgq/*.c')
-    CPPPATH += [cwd + '/msgq']
+    src += ['msgq_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_TIMER'):
-    src += Glob('timer/*.c')
-    CPPPATH += [cwd + '/timer']
+    src += ['timer_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_HEAP'):
-    src += Glob('dynmem/*.c')
-    CPPPATH += [cwd + '/dynmem']
+    src += ['dynmem_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_MEMPOOL'):
-    src += Glob('mempool/*.c')
-    CPPPATH += [cwd + '/mempool']
+    src += ['memp_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_IDLEHOOK'):
-    src += Glob('idlehook/*.c')
-    CPPPATH += [cwd + '/idlehook']
+    src += ['idlehook_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_SIGNAL'):
-    src += Glob('signal/*.c')
-    CPPPATH += [cwd + '/signal']
+    src += ['signal_sample.c']
 
 if GetDepend('KERNEL_SAMPLES_USING_INTERRUPT'):
-    src += Glob('interrupt/*.c')
-    CPPPATH += [cwd + '/interrupt']
-	
-group = DefineGroup('kernel-samples', src, depend = ['PKG_USING_KERNEL_SAMPLES'], CPPPATH = CPPPATH)
+    src += ['interrupt_sample.c']
+
+if GetDepend('KERNEL_SAMPLES_USING_PRI_INVERSION'):
+    src += ['priority_inversion.c']
+
+if GetDepend('KERNEL_SAMPLES_USING_TIME_SLICE'):
+    src += ['timeslice_sample.c']
+
+if GetDepend('KERNEL_SAMPLES_USING_SCHEDULER_HOOK'):
+    src += ['scheduler_hook.c']
+
+group = DefineGroup('kernel-samples', src, depend = ['PKG_USING_KERNEL_SAMPLES'], CPPPATH = include_path)
 
 Return('group')

+ 0 - 0
dynmem/dynmem_sample.c → dynmem_sample.c


+ 0 - 0
event/event_sample.c → event_sample.c


+ 0 - 0
idlehook/idlehook_sample.c → idlehook_sample.c


+ 0 - 0
interrupt/interrupt_sample.c → interrupt_sample.c


+ 0 - 0
mailbox/mailbox_sample.c → mailbox_sample.c


+ 0 - 0
mempool/memp_sample.c → memp_sample.c


+ 0 - 0
msgq/msgq_sample.c → msgq_sample.c


+ 0 - 0
mutex/mutex_sample.c → mutex_sample.c


+ 0 - 0
mutex/pri_inversion.c → priority_inversion.c


+ 0 - 0
semaphore/producer_consumer.c → producer_consumer.c


+ 0 - 0
thread/scheduler_hook.c → scheduler_hook.c


+ 0 - 0
semaphore/semaphore_sample.c → semaphore_sample.c


+ 0 - 0
signal/signal_sample.c → signal_sample.c


+ 0 - 0
thread/thread_sample.c → thread_sample.c


+ 0 - 0
timer/timer_sample.c → timer_sample.c


+ 0 - 0
thread/timeslice_sample.c → timeslice_sample.c