1
0

SConscript 964 B

123456789101112131415161718192021222324252627282930313233
  1. from building import *
  2. from gcc import *
  3. import rtconfig
  4. import os
  5. # The set of source files associated with this SConscript file.
  6. src = []
  7. cwd = GetCurrentDir()
  8. CPPPATH = [cwd + "/include"]
  9. group = []
  10. LOCAL_CFLAGS = ''
  11. if GetDepend('RT_USING_DFS') and not GetDepend('RT_USING_DFS_V2'):
  12. src = ['src/dfs.c', 'src/dfs_file.c', 'src/dfs_fs.c']
  13. if GetDepend('DFS_USING_POSIX'):
  14. src += ['src/dfs_posix.c']
  15. if rtconfig.PLATFORM in GetGCCLikePLATFORM():
  16. LOCAL_CFLAGS += ' -std=c99'
  17. elif rtconfig.PLATFORM in ['armcc']:
  18. LOCAL_CFLAGS += ' --c99'
  19. group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)
  20. # search in the file system implementation
  21. list = os.listdir(cwd)
  22. for item in list:
  23. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  24. group = group + SConscript(os.path.join(item, 'SConscript'))
  25. Return('group')