SConscript 457 字节
Newer Older
B
bigmagic 已提交
1 2 3 4 5 6
from building import *

cwd     = GetCurrentDir()
src     = Glob('*.c') + Glob('*.cpp')
CPPPATH = [cwd, str(Dir('#'))]

Nameless-Y's avatar
Nameless-Y 已提交
7
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
B
bigamgic 已提交
8 9 10 11 12 13 14 15 16 17

# build for sub-directory
list = os.listdir(cwd)
objs = []

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 = group + objs
B
bigmagic 已提交
18 19

Return('group')