1from building import * 2from gcc import * 3import rtconfig 4import os 5 6# The set of source files associated with this SConscript file. 7src = [] 8cwd = GetCurrentDir() 9CPPPATH = [cwd + "/include"] 10group = [] 11LOCAL_CFLAGS = '' 12 13if GetDepend('RT_USING_DFS') and not GetDepend('RT_USING_DFS_V2'): 14 src = ['src/dfs.c', 'src/dfs_file.c', 'src/dfs_fs.c'] 15 16 if GetDepend('DFS_USING_POSIX'): 17 src += ['src/dfs_posix.c'] 18 19 if rtconfig.PLATFORM in GetGCCLikePLATFORM(): 20 LOCAL_CFLAGS += ' -std=c99' 21 elif rtconfig.PLATFORM in ['armcc']: 22 LOCAL_CFLAGS += ' --c99' 23 24 group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) 25 26 # search in the file system implementation 27 list = os.listdir(cwd) 28 29 for item in list: 30 if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 31 group = group + SConscript(os.path.join(item, 'SConscript')) 32 33Return('group') 34