import glob import os Import('*') allsrc = glob.glob('*.cpp') # Import subdir build files for d in glob.glob('*'): if os.path.isdir(d) and os.path.exists(d + '/SConscript'): src = SConscript(d + '/SConscript') for s in src: allsrc.append(d + '/' + s) Return('allsrc')