Kaynağa Gözat

移除目录

misonyo 7 yıl önce
ebeveyn
işleme
d3fb880b57

+ 24 - 30
SConscript

@@ -1,61 +1,55 @@
-
 from building import *
 from building import *
-Import('rtconfig')
 
 
 src   = []
 src   = []
 cwd   = GetCurrentDir()
 cwd   = GetCurrentDir()
-group = []
-CPPPATH = []
+include_path = [cwd]
 
 
 # add kernel samples.
 # add kernel samples.
 if GetDepend('KERNEL_SAMPLES_USING_THREAD'):
 if GetDepend('KERNEL_SAMPLES_USING_THREAD'):
-    src += Glob('thread/*.c')
-    CPPPATH += [cwd + '/thread']
+    src += ['thread_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_SEMAPHORE'):
 if GetDepend('KERNEL_SAMPLES_USING_SEMAPHORE'):
-    src += Glob('semaphore/*.c')
-    CPPPATH += [cwd + '/semaphore']
+    src += ['semaphore_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_MUTEX'):
 if GetDepend('KERNEL_SAMPLES_USING_MUTEX'):
-    src += Glob('mutex/*.c')
-    CPPPATH += [cwd + '/mutex']
+    src += ['mutex_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_MAILBOX'):
 if GetDepend('KERNEL_SAMPLES_USING_MAILBOX'):
-    src += Glob('mailbox/*.c')
-    CPPPATH += [cwd + '/mailbox']
+    src += ['mailbox_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_EVENT'):
 if GetDepend('KERNEL_SAMPLES_USING_EVENT'):
-    src += Glob('event/*.c')
-    CPPPATH += [cwd + '/event']
+    src += ['event_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_MESSAGEQUEUE'):
 if GetDepend('KERNEL_SAMPLES_USING_MESSAGEQUEUE'):
-    src += Glob('msgq/*.c')
-    CPPPATH += [cwd + '/msgq']
+    src += ['msgq_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_TIMER'):
 if GetDepend('KERNEL_SAMPLES_USING_TIMER'):
-    src += Glob('timer/*.c')
-    CPPPATH += [cwd + '/timer']
+    src += ['timer_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_HEAP'):
 if GetDepend('KERNEL_SAMPLES_USING_HEAP'):
-    src += Glob('dynmem/*.c')
-    CPPPATH += [cwd + '/dynmem']
+    src += ['dynmem_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_MEMPOOL'):
 if GetDepend('KERNEL_SAMPLES_USING_MEMPOOL'):
-    src += Glob('mempool/*.c')
-    CPPPATH += [cwd + '/mempool']
+    src += ['memp_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_IDLEHOOK'):
 if GetDepend('KERNEL_SAMPLES_USING_IDLEHOOK'):
-    src += Glob('idlehook/*.c')
-    CPPPATH += [cwd + '/idlehook']
+    src += ['idlehook_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_SIGNAL'):
 if GetDepend('KERNEL_SAMPLES_USING_SIGNAL'):
-    src += Glob('signal/*.c')
-    CPPPATH += [cwd + '/signal']
+    src += ['signal_sample.c']
 
 
 if GetDepend('KERNEL_SAMPLES_USING_INTERRUPT'):
 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')
 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