SConscript 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. Import('env')
  2. Import('rtconfig')
  3. Import('RTT_ROOT')
  4. Import('projects')
  5. dfs = Split("""
  6. src/dfs.c
  7. src/dfs_fs.c
  8. src/dfs_file.c
  9. src/dfs_posix.c
  10. """)
  11. # DFS-ELMFAT options
  12. elmfat = Split("""
  13. filesystems/elmfat/dfs_elm.c
  14. filesystems/elmfat/ff.c
  15. """)
  16. # DFS-ROMFS options
  17. romfs = Split("""
  18. filesystems/romfs/dfs_romfs.c
  19. filesystems/romfs/romfs.c
  20. """)
  21. # DFS-YAFFS2 options
  22. yaffs2_main = Split("""
  23. filesystems/yaffs2/direct/yaffscfg.c
  24. filesystems/yaffs2/direct/yaffs_fileem.c
  25. filesystems/yaffs2/direct/yaffsfs.c
  26. filesystems/yaffs2/direct/dfs_yaffs2.c
  27. """)
  28. yaffs2_comm = Split("""
  29. filesystems/yaffs2/yaffs_ecc.c
  30. filesystems/yaffs2/yaffs_guts.c
  31. filesystems/yaffs2/yaffs_packedtags1.c
  32. filesystems/yaffs2/yaffs_tagscompat.c
  33. filesystems/yaffs2/yaffs_packedtags2.c
  34. filesystems/yaffs2/yaffs_tagsvalidity.c
  35. filesystems/yaffs2/yaffs_nand.c
  36. filesystems/yaffs2/yaffs_checkptrw.c
  37. filesystems/yaffs2/yaffs_qsort.c
  38. """)
  39. nfs = Split('''
  40. filesystems/nfs/mount_clnt.c
  41. filesystems/nfs/mount_xdr.c
  42. filesystems/nfs/nfs_clnt.c
  43. filesystems/nfs/nfs_xdr.c
  44. filesystems/nfs/dfs_nfs.c
  45. filesystems/nfs/rpc/auth_none.c
  46. filesystems/nfs/rpc/clnt_generic.c
  47. filesystems/nfs/rpc/clnt_udp.c
  48. filesystems/nfs/rpc/rpc_prot.c
  49. filesystems/nfs/rpc/pmap.c
  50. filesystems/nfs/rpc/xdr.c
  51. filesystems/nfs/rpc/xdr_mem.c
  52. ''')
  53. src_local = dfs
  54. # The set of source files associated with this SConscript file.
  55. path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
  56. if 'RT_USING_DFS_YAFFS2' in dir(rtconfig) and rtconfig.RT_USING_DFS_YAFFS2:
  57. src_local = src_local + yaffs2_main + yaffs2_comm
  58. path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2', RTT_ROOT + '/components/dfs/filesystems/yaffs2/direct']
  59. if 'RT_DFS_ELM_USE_LFN' in dir(rtconfig) and rtconfig.RT_DFS_ELM_USE_LFN:
  60. elmfat += ['filesystems/elmfat/option/cc936.c']
  61. if 'RT_USING_DFS_ELMFAT' in dir(rtconfig) and rtconfig.RT_USING_DFS_ELMFAT:
  62. src_local = src_local + elmfat
  63. if 'RT_USING_DFS_NFS' in dir(rtconfig) and rtconfig.RT_USING_DFS_NFS:
  64. src_local = src_local + nfs
  65. path = path + [RTT_ROOT + '/components/dfs/filesystems/nfs']
  66. if 'RT_USING_DFS_ROMFS' in dir(rtconfig) and rtconfig.RT_USING_DFS_ROMFS:
  67. src_local = src_local + romfs
  68. path = path + [RTT_ROOT + '/components/dfs/filesystems/romfs']
  69. # group definitions
  70. group = {}
  71. group['name'] = 'Filesystem'
  72. group['src'] = File(src_local)
  73. group['CCFLAGS'] = ''
  74. group['CPPPATH'] = path
  75. group['CPPDEFINES'] = ''
  76. group['LINKFLAGS'] = ''
  77. # add group to project list
  78. projects.append(group)
  79. env.Append(CCFLAGS = group['CCFLAGS'])
  80. env.Append(CPPPATH = group['CPPPATH'])
  81. env.Append(CPPDEFINES = group['CPPDEFINES'])
  82. env.Append(LINKFLAGS = group['LINKFLAGS'])
  83. obj = env.Object(group['src'])
  84. Return('obj')