2023-04-04 15:02:56 +08:00
|
|
|
from building import *
|
|
|
|
import os
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
2023-06-10 21:35:25 +08:00
|
|
|
src = Split('''
|
|
|
|
src/dfs.c
|
|
|
|
src/dfs_file.c
|
|
|
|
src/dfs_fs.c
|
|
|
|
src/dfs_dentry.c
|
|
|
|
src/dfs_vnode.c
|
|
|
|
src/dfs_mnt.c
|
|
|
|
src/dfs_posix.c
|
|
|
|
''')
|
|
|
|
cwd = GetCurrentDir()
|
2023-04-04 15:02:56 +08:00
|
|
|
CPPPATH = [cwd + "/include"]
|
|
|
|
|
2023-06-10 21:35:25 +08:00
|
|
|
if GetDepend('RT_USING_POSIX'):
|
|
|
|
src += ['src/poll.c', 'src/select.c']
|
2023-04-04 15:02:56 +08:00
|
|
|
|
2023-06-10 21:35:25 +08:00
|
|
|
group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_V2'], CPPPATH = CPPPATH)
|
2023-04-04 15:02:56 +08:00
|
|
|
|
2023-06-10 21:35:25 +08:00
|
|
|
if GetDepend('RT_USING_DFS') and GetDepend('RT_USING_DFS_V2'):
|
2023-04-04 15:02:56 +08:00
|
|
|
# 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')
|