SConscript 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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_CFLAGS: Local c compilation parameter
  20. # LOCAL_CCFLAGS: Local c/c++ compilation parameter
  21. # LOCAL_CXXFLAGS: Local c++ compilation parameter
  22. # LOCAL_ASFLAGS: Local assembly parameters
  23. #
  24. # CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
  25. # is empty # no pass!!!
  26. # CFLAGS : Global compilation parameter
  27. # ASFLAGS: Global assembly parameters
  28. #
  29. # CPPDEFINES: Global macro definition
  30. # LOCAL_CPPDEFINES: Local macro definition
  31. #
  32. # LIBS: Specify the static library that need to be linked
  33. # LIBPATH: Specify the search directory for the library file (.lib/.a)
  34. #
  35. # LINKFLAGS: Link options
  36. #---------------------------------------------------------------------------------
  37. CWD = GetCurrentDir()
  38. SOURCES = Glob("./source/*.c")
  39. LOCAL_CPPPATH = []
  40. LOCAL_CFLAGS = ""
  41. LOCAL_CCFLAGS = ""
  42. LOCAL_CXXFLAGS = ""
  43. LOCAL_ASFLAGS = ""
  44. CPPPATH = [GetCurrentDir(), os.path.join(GetCurrentDir(), 'include')]
  45. CFLAGS = ""
  46. CCFLAGS = ""
  47. CXXFLAGS = ""
  48. ASFLAGS = ""
  49. CPPDEFINES = []
  50. LOCAL_CPPDEFINES = []
  51. LIBS = []
  52. LIBPATH = []
  53. LINKFLAGS = ""
  54. SOURCES_IGNORE = []
  55. CPPPATH_IGNORE = []
  56. #---------------------------------------------------------------------------------
  57. # Main target
  58. #---------------------------------------------------------------------------------
  59. objs = DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
  60. CPPPATH = CPPPATH,
  61. CFLAGS = CFLAGS,
  62. CCFLAGS = CCFLAGS,
  63. CXXFLAGS = CXXFLAGS,
  64. ASFLAGS = ASFLAGS,
  65. LOCAL_CPPPATH = LOCAL_CPPPATH,
  66. LOCAL_CFLAGS = LOCAL_CFLAGS,
  67. LOCAL_CCFLAGS = LOCAL_CCFLAGS,
  68. LOCAL_CXXFLAGS = LOCAL_CXXFLAGS,
  69. LOCAL_ASFLAGS = LOCAL_ASFLAGS,
  70. CPPDEFINES = CPPDEFINES,
  71. LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
  72. LIBS = LIBS,
  73. LIBPATH = LIBPATH,
  74. LINKFLAGS = LINKFLAGS)
  75. Return("objs")
  76. #---------------------------------------------------------------------------------
  77. # End
  78. #---------------------------------------------------------------------------------