import os from building import * Import('RTT_ROOT') Import('rtconfig') # get current dir path cwd = GetCurrentDir() # init src and inc vars src = [] inc = [] # add librws common include inc = inc + [cwd + '/include'] # add librws lib LIBS = ['rws_gcc'] LIBPATH = [cwd] # add group to IDE project objs = DefineGroup('librws', src, depend = ['PKG_USING_LIBRWS'], CPPPATH = inc, LIBS = LIBS, LIBPATH = LIBPATH) # traversal subscript list = os.listdir(cwd) 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')) Return('objs')