2022-01-10 16:20:39 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
src = Split('''
|
|
|
|
src/dfs.c
|
|
|
|
src/dfs_file.c
|
|
|
|
src/dfs_fs.c
|
2022-01-10 17:10:14 +08:00
|
|
|
src/dfs_posix.c
|
2022-01-10 16:20:39 +08:00
|
|
|
''')
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
CPPPATH = [cwd + "/include"]
|
|
|
|
|
2022-01-10 17:10:14 +08:00
|
|
|
if GetDepend('RT_USING_POSIX'):
|
|
|
|
src += ['src/dfs_poll.c', 'src/dfs_select.c']
|
2022-01-10 16:20:39 +08:00
|
|
|
|
|
|
|
group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS'], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_DFS'):
|
|
|
|
# search in the file system implementation
|
|
|
|
list = os.listdir(cwd)
|
|
|
|
|
|
|
|
for item in list:
|
|
|
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
|
|
|
group = group + SConscript(os.path.join(item, 'SConscript'))
|
|
|
|
|
|
|
|
Return('group')
|