SConscript 2.6 KB

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