blob: 0eb090263628640a88f5950578a0f070b7512ea8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
Import('env')
Import('rtconfig')
Import('RTT_ROOT')
Import('projects')
dfs = Split("""
src/dfs.c
src/dfs_fs.c
src/dfs_file.c
src/dfs_posix.c
""")
# DFS-ELMFAT options
elmfat = Split("""
filesystems/elmfat/dfs_elm.c
filesystems/elmfat/ff.c
""")
# DFS-ROMFS options
romfs = Split("""
filesystems/romfs/dfs_romfs.c
filesystems/romfs/romfs.c
""")
# DFS-DeviceFS options
devfs = Split("""
filesystems/devfs/devfs.c
filesystems/devfs/console.c
""")
# 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
""")
nfs = Split('''
filesystems/nfs/mount_clnt.c
filesystems/nfs/mount_xdr.c
filesystems/nfs/nfs_clnt.c
filesystems/nfs/nfs_xdr.c
filesystems/nfs/dfs_nfs.c
filesystems/nfs/rpc/auth_none.c
filesystems/nfs/rpc/clnt_generic.c
filesystems/nfs/rpc/clnt_udp.c
filesystems/nfs/rpc/rpc_prot.c
filesystems/nfs/rpc/pmap.c
filesystems/nfs/rpc/xdr.c
filesystems/nfs/rpc/xdr_mem.c
''')
src_local = dfs
# The set of source files associated with this SConscript file.
path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
if 'RT_USING_DFS_YAFFS2' in dir(rtconfig) and rtconfig.RT_USING_DFS_YAFFS2:
src_local = src_local + yaffs2_main + yaffs2_comm
path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2', RTT_ROOT + '/components/dfs/filesystems/yaffs2/direct']
if 'RT_DFS_ELM_USE_LFN' in dir(rtconfig) and rtconfig.RT_DFS_ELM_USE_LFN:
elmfat += ['filesystems/elmfat/option/cc936.c']
if 'RT_USING_DFS_ELMFAT' in dir(rtconfig) and rtconfig.RT_USING_DFS_ELMFAT:
src_local = src_local + elmfat
if 'RT_USING_DFS_NFS' in dir(rtconfig) and rtconfig.RT_USING_DFS_NFS and rtconfig.RT_USING_LWIP:
src_local = src_local + nfs
path = path + [RTT_ROOT + '/components/dfs/filesystems/nfs']
if 'RT_USING_DFS_ROMFS' in dir(rtconfig) and rtconfig.RT_USING_DFS_ROMFS:
src_local = src_local + romfs
path = path + [RTT_ROOT + '/components/dfs/filesystems/romfs']
if 'RT_USING_DFS_DEVFS' in dir(rtconfig) and rtconfig.RT_USING_DFS_DEVFS:
src_local = src_local + devfs
path = path + [RTT_ROOT + '/components/dfs/filesystems/devfs']
# 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)
env.Append(CCFLAGS = group['CCFLAGS'])
env.Append(CPPPATH = group['CPPPATH'])
env.Append(CPPDEFINES = group['CPPDEFINES'])
env.Append(LINKFLAGS = group['LINKFLAGS'])
obj = env.Object(group['src'])
Return('obj')
|