2023-04-04 15:02:56 +08:00
|
|
|
from building import *
|
2024-08-08 14:08:59 +08:00
|
|
|
from gcc import *
|
|
|
|
import rtconfig
|
2023-04-04 15:02:56 +08:00
|
|
|
import os
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
src = []
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
CPPPATH = [cwd + "/include"]
|
|
|
|
group = []
|
2024-08-08 14:08:59 +08:00
|
|
|
LOCAL_CFLAGS = ''
|
2023-04-04 15:02:56 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USING_DFS') and not GetDepend('RT_USING_DFS_V2'):
|
|
|
|
src = ['src/dfs.c', 'src/dfs_file.c', 'src/dfs_fs.c']
|
|
|
|
|
|
|
|
if GetDepend('DFS_USING_POSIX'):
|
|
|
|
src += ['src/dfs_posix.c']
|
|
|
|
|
2024-08-08 14:08:59 +08:00
|
|
|
if rtconfig.PLATFORM in GetGCCLikePLATFORM():
|
|
|
|
LOCAL_CFLAGS += ' -std=c99'
|
|
|
|
elif rtconfig.PLATFORM in ['armcc']:
|
|
|
|
LOCAL_CFLAGS += ' --c99'
|
|
|
|
|
|
|
|
group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)
|
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')
|