|
@@ -1,15 +1,19 @@
|
|
|
-# RT-Thread building script for bridge
|
|
|
+# SConscript for sensor framework
|
|
|
|
|
|
-import os
|
|
|
from building import *
|
|
|
+import os
|
|
|
+
|
|
|
+src = []
|
|
|
|
|
|
-cwd = GetCurrentDir()
|
|
|
-objs = []
|
|
|
-list = os.listdir(cwd)
|
|
|
+if GetDepend('RT_USING_SENSOR_V2'):
|
|
|
+ src += [os.path.join('v2', 'sensor.c')]
|
|
|
+ if GetDepend('RT_USING_SENSOR_CMD'):
|
|
|
+ src += [os.path.join('v2', 'sensor_cmd.c')]
|
|
|
+else:
|
|
|
+ src += [os.path.join('v1', 'sensor.c')]
|
|
|
+ if GetDepend('RT_USING_SENSOR_CMD'):
|
|
|
+ src += [os.path.join('v1', 'sensor_cmd.c')]
|
|
|
|
|
|
-for d in list:
|
|
|
- path = os.path.join(cwd, d)
|
|
|
- if os.path.isfile(os.path.join(path, 'SConscript')):
|
|
|
- objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
|
|
+group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SENSOR'])
|
|
|
|
|
|
-Return('objs')
|
|
|
+Return('group')
|