1import os
2from building import *
3
4cwd = GetCurrentDir()
5
6# add general drivers
7src = []
8path =  []
9
10if GetDepend(['RT_USING_CHERRYUSB']):
11    src += Glob('cherryusb/cherryusb.c')
12    path += [cwd + '/cherryusb']
13
14group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
15
16list = os.listdir(cwd)
17for item in list:
18    if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
19        group = group + SConscript(os.path.join(item, 'SConscript'))
20
21Return('group')