1from building import *
2
3cwd     = GetCurrentDir()
4src     = Glob('*.c') + Glob('*.cpp') + Glob('*.S')
5CPPPATH = [cwd, str(Dir('#'))]
6
7group = DefineGroup('driver', src, depend = [''], CPPPATH = CPPPATH)
8
9# build for sub-directory
10list = os.listdir(cwd)
11objs = []
12
13for d in list:
14    path = os.path.join(cwd, d)
15    if os.path.isfile(os.path.join(path, 'SConscript')):
16        objs = objs + SConscript(os.path.join(d, 'SConscript'))
17group = group + objs
18
19Return('group')
20