SConscript 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #-*- encoding: utf-8 -*-
  2. #-------------------------------------------------------------------------------
  3. # RT-Thread RuiChing
  4. #
  5. # COPYRIGHT (C) 2024-2025 Shanghai Real-Thread Electronic Technology Co., Ltd.
  6. # All rights reserved.
  7. #
  8. # The license and distribution terms for this file may be
  9. # found in the file LICENSE in this distribution.
  10. #-------------------------------------------------------------------------------
  11. import os
  12. from building import *
  13. Import('RTT_ROOT')
  14. Import('rtconfig')
  15. #-------------------------------------------------------------------------------
  16. # Package configuration
  17. #-------------------------------------------------------------------------------
  18. PKGNAME = 'dfs'
  19. DEPENDS = []
  20. #-------------------------------------------------------------------------------
  21. # Compile the configuration
  22. #-------------------------------------------------------------------------------
  23. SOURCES = Glob('src/*.c')
  24. LOCAL_CPPPATH = []
  25. LOCAL_CCFLAGS = ""
  26. LOCAL_ASFLAGS = ""
  27. CPPPATH = [os.path.join(GetCurrentDir(), './include')]
  28. CCFLAGS = ""
  29. ASFLAGS = ""
  30. CPPDEFINES = []
  31. LOCAL_CPPDEFINES = []
  32. LIBS = []
  33. LIBPATH = [GetCurrentDir()]
  34. LINKFLAGS = ""
  35. #-------------------------------------------------------------------------------
  36. # Feature clip configuration, optional
  37. #-------------------------------------------------------------------------------
  38. #-------------------------------------------------------------------------------
  39. # Compiler platform configuration, optional
  40. #-------------------------------------------------------------------------------
  41. #-------------------------------------------------------------------------------
  42. # System variables
  43. #-------------------------------------------------------------------------------
  44. objs = []
  45. root = GetCurrentDir()
  46. #-------------------------------------------------------------------------------
  47. # Sub target
  48. #-------------------------------------------------------------------------------
  49. list = os.listdir(root)
  50. if GetDepend(DEPENDS):
  51. for d in list:
  52. path = os.path.join(root, d)
  53. if os.path.isfile(os.path.join(path, 'SConscript')):
  54. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  55. #-------------------------------------------------------------------------------
  56. # Main target
  57. #-------------------------------------------------------------------------------
  58. objs += DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
  59. CPPPATH = CPPPATH,
  60. CCFLAGS = CCFLAGS,
  61. ASFLAGS = ASFLAGS,
  62. LOCAL_CPPPATH = LOCAL_CPPPATH,
  63. LOCAL_CCFLAGS = LOCAL_CCFLAGS,
  64. LOCAL_ASFLAGS = LOCAL_ASFLAGS,
  65. CPPDEFINES = CPPDEFINES,
  66. LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
  67. LIBS = LIBS,
  68. LIBPATH = LIBPATH,
  69. LINKFLAGS = LINKFLAGS)
  70. Return("objs")
  71. #-------------------------------------------------------------------------------
  72. # End
  73. #-------------------------------------------------------------------------------