SConscript 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #-*- encoding: utf-8 -*-
  2. import os
  3. from building import *
  4. Import('RTT_ROOT')
  5. Import('rtconfig')
  6. #---------------------------------------------------------------------------------
  7. # Package configuration
  8. #---------------------------------------------------------------------------------
  9. PKGNAME = "bmsis"
  10. VERSION = "v1.0.0"
  11. DEPENDS = [""]
  12. #DEPENDS = ["PKG_USING_RW007"]
  13. #---------------------------------------------------------------------------------
  14. # Compile the configuration
  15. #
  16. # SOURCES: Need to compile c and c++ source, auto search when SOURCES is empty
  17. #
  18. # LOCAL_CPPPATH: Local file path (.h/.c/.cpp)
  19. # LOCAL_CCFLAGS: Local compilation parameter
  20. # LOCAL_ASFLAGS: Local assembly parameters
  21. #
  22. # CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
  23. # is empty # no pass!!!
  24. # CCFLAGS: Global compilation parameter
  25. # ASFLAGS: Global assembly parameters
  26. #
  27. # CPPDEFINES: Global macro definition
  28. # LOCAL_CPPDEFINES: Local macro definition
  29. #
  30. # LIBS: Specify the static library that need to be linked
  31. # LIBPATH: Specify the search directory for the library file (.lib/.a)
  32. #
  33. # LINKFLAGS: Link options
  34. #---------------------------------------------------------------------------------
  35. SOURCES = Glob("./source/*.c")
  36. SOURCES += Glob("./source/startup_ch32v30x.S")
  37. LOCAL_CPPPATH = []
  38. LOCAL_CCFLAGS = ""
  39. LOCAL_ASFLAGS = ""
  40. CPPPATH = [GetCurrentDir(), os.path.join(GetCurrentDir(), 'include')]
  41. CCFLAGS = ""
  42. ASFLAGS = ""
  43. CPPDEFINES = []
  44. LOCAL_CPPDEFINES = []
  45. LIBS = []
  46. LIBPATH = []
  47. LINKFLAGS = ""
  48. SOURCES_IGNORE = []
  49. CPPPATH_IGNORE = []
  50. #---------------------------------------------------------------------------------
  51. # Main target
  52. #---------------------------------------------------------------------------------
  53. objs = DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
  54. CPPPATH = CPPPATH,
  55. CCFLAGS = CCFLAGS,
  56. ASFLAGS = ASFLAGS,
  57. LOCAL_CPPPATH = LOCAL_CPPPATH,
  58. LOCAL_CCFLAGS = LOCAL_CCFLAGS,
  59. LOCAL_ASFLAGS = LOCAL_ASFLAGS,
  60. CPPDEFINES = CPPDEFINES,
  61. LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
  62. LIBS = LIBS,
  63. LIBPATH = LIBPATH,
  64. LINKFLAGS = LINKFLAGS)
  65. Return("objs")
  66. #---------------------------------------------------------------------------------
  67. # End
  68. #---------------------------------------------------------------------------------