2009-10-20 17:18:45 +08:00
|
|
|
Import('env')
|
|
|
|
Import('rtconfig')
|
|
|
|
Import('RTT_ROOT')
|
2010-04-18 23:27:13 +08:00
|
|
|
Import('projects')
|
2009-10-20 17:18:45 +08:00
|
|
|
|
|
|
|
dfs = Split("""
|
|
|
|
src/dfs_fs.c
|
|
|
|
src/dfs_init.c
|
|
|
|
src/dfs_posix.c
|
|
|
|
src/dfs_raw.c
|
|
|
|
src/dfs_util.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
# DFS-FatFs options
|
|
|
|
fatfs = Split("""
|
|
|
|
filesystems/fatfs/fatfs_cache.c
|
|
|
|
filesystems/fatfs/fatfs_direntry.c
|
|
|
|
filesystems/fatfs/fatfs_fat.c
|
|
|
|
filesystems/fatfs/fatfs_file.c
|
|
|
|
filesystems/fatfs/fatfs_filename.c
|
|
|
|
filesystems/fatfs/fatfs_init.c
|
|
|
|
filesystems/fatfs_misc.c
|
|
|
|
filesystems/fatfs/fatfs_mount.c""")
|
|
|
|
|
2009-10-26 12:33:18 +08:00
|
|
|
# DFS-ELMFAT options
|
|
|
|
elmfat = Split("""
|
|
|
|
filesystems/elmfat/dfs_elm.c
|
|
|
|
filesystems/elmfat/ff.c
|
|
|
|
""")
|
|
|
|
|
2009-10-20 17:18:45 +08:00
|
|
|
# DFS-YAFFS2 options
|
|
|
|
yaffs2_main = Split("""
|
|
|
|
filesystems/yaffs2/direct/yaffscfg.c
|
|
|
|
filesystems/yaffs2/direct/yaffs_fileem.c
|
|
|
|
filesystems/yaffs2/direct/yaffsfs.c
|
|
|
|
filesystems/yaffs2/direct/dfs_yaffs2.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
yaffs2_comm = Split("""
|
|
|
|
filesystems/yaffs2/yaffs_ecc.c
|
|
|
|
filesystems/yaffs2/yaffs_guts.c
|
|
|
|
filesystems/yaffs2/yaffs_packedtags1.c
|
|
|
|
filesystems/yaffs2/yaffs_tagscompat.c
|
|
|
|
filesystems/yaffs2/yaffs_packedtags2.c
|
|
|
|
filesystems/yaffs2/yaffs_tagsvalidity.c
|
|
|
|
filesystems/yaffs2/yaffs_nand.c
|
|
|
|
filesystems/yaffs2/yaffs_checkptrw.c
|
|
|
|
filesystems/yaffs2/yaffs_qsort.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
src_local = dfs
|
2010-04-18 23:27:13 +08:00
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
|
2009-10-20 17:18:45 +08:00
|
|
|
|
|
|
|
if rtconfig.RT_USING_DFS_YAFFS2:
|
|
|
|
src_local = src_local + yaffs2_main + yaffs2_comm
|
2010-04-18 23:27:13 +08:00
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2', RTT_ROOT + '/components/dfs/filesystems/yaffs2/direct']
|
2009-10-20 17:18:45 +08:00
|
|
|
|
2010-04-20 09:09:07 +08:00
|
|
|
if rtconfig.RT_DFS_ELM_USE_LFN:
|
|
|
|
elmfat += ['filesystems/elmfat/option/cc936.c']
|
|
|
|
|
2009-10-26 12:33:18 +08:00
|
|
|
if rtconfig.RT_USING_DFS_ELMFAT:
|
|
|
|
src_local = src_local + elmfat
|
2010-04-18 23:27:13 +08:00
|
|
|
# path = path + [RTT_ROOT + '/components/dfs/filesystems/elmfat']
|
2010-04-20 09:09:07 +08:00
|
|
|
|
2010-04-18 23:27:13 +08:00
|
|
|
# group definitions
|
|
|
|
group = {}
|
|
|
|
group['name'] = 'Filesystem'
|
|
|
|
group['src'] = File(src_local)
|
|
|
|
group['CCFLAGS'] = ''
|
|
|
|
group['CPPPATH'] = path
|
|
|
|
group['CPPDEFINES'] = ''
|
|
|
|
group['LINKFLAGS'] = ''
|
|
|
|
|
|
|
|
# add group to project list
|
|
|
|
projects.append(group)
|
2009-10-26 12:33:18 +08:00
|
|
|
|
2010-04-18 23:27:13 +08:00
|
|
|
env.Append(CCFLAGS = group['CCFLAGS'])
|
|
|
|
env.Append(CPPPATH = group['CPPPATH'])
|
|
|
|
env.Append(CPPDEFINES = group['CPPDEFINES'])
|
|
|
|
env.Append(LINKFLAGS = group['LINKFLAGS'])
|
2009-10-20 17:18:45 +08:00
|
|
|
|
2010-04-18 23:27:13 +08:00
|
|
|
obj = env.Object(group['src'])
|
2009-10-20 17:18:45 +08:00
|
|
|
|
|
|
|
Return('obj')
|