SConscript 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #-*- encoding: utf-8 -*-
  2. #---------------------------------------------------------------------------------
  3. # @File: Sconscript for package
  4. # @Author: liu2guang
  5. # @Date: 2018-09-19 18:07:00(v0.1.0)
  6. #
  7. # @LICENSE: GPLv3: https://github.com/rtpkgs/buildpkg/blob/master/LICENSE.
  8. #
  9. #---------------------------------------------------------------------------------
  10. import os
  11. from building import *
  12. Import('RTT_ROOT')
  13. Import('rtconfig')
  14. #---------------------------------------------------------------------------------
  15. # Package configuration
  16. #---------------------------------------------------------------------------------
  17. PKGNAME = "rw007"
  18. VERSION = "v0.0.1"
  19. DEPENDS = ["PKG_USING_RW007"]
  20. #---------------------------------------------------------------------------------
  21. # Compile the configuration
  22. #
  23. # SOURCES: Need to compile c and c++ source, auto search when SOURCES is empty
  24. #
  25. # LOCAL_CPPPATH: Local file path (.h/.c/.cpp)
  26. # LOCAL_CCFLAGS: Local compilation parameter
  27. # LOCAL_ASFLAGS: Local assembly parameters
  28. #
  29. # CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
  30. # is empty # no pass!!!
  31. # CCFLAGS: Global compilation parameter
  32. # ASFLAGS: Global assembly parameters
  33. #
  34. # CPPDEFINES: Global macro definition
  35. # LOCAL_CPPDEFINES: Local macro definition
  36. #
  37. # LIBS: Specify the static library that need to be linked
  38. # LIBPATH: Specify the search directory for the library file (.lib/.a)
  39. #
  40. # LINKFLAGS: Link options
  41. #---------------------------------------------------------------------------------
  42. SOURCES = ["src/spi_wifi_rw007.c"]
  43. if GetDepend(['RW007_USING_STM32_DRIVERS']):
  44. SOURCES += ["example/rw007_stm32_port.c"]
  45. if GetDepend(['RW007_USING_BLE']):
  46. SOURCES += ["src/spi_ble_rw007.c"]
  47. SOURCES += ["src/ble_cmd_rw007.c"]
  48. LOCAL_CPPPATH = []
  49. LOCAL_CCFLAGS = ""
  50. LOCAL_ASFLAGS = ""
  51. CPPPATH = [GetCurrentDir(), os.path.join(GetCurrentDir(), 'inc')]
  52. CCFLAGS = ""
  53. ASFLAGS = ""
  54. CPPDEFINES = []
  55. LOCAL_CPPDEFINES = []
  56. LIBS = []
  57. LIBPATH = []
  58. LINKFLAGS = ""
  59. SOURCES_IGNORE = []
  60. CPPPATH_IGNORE = []
  61. #---------------------------------------------------------------------------------
  62. # Main target
  63. #---------------------------------------------------------------------------------
  64. objs = DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
  65. CPPPATH = CPPPATH,
  66. CCFLAGS = CCFLAGS,
  67. ASFLAGS = ASFLAGS,
  68. LOCAL_CPPPATH = LOCAL_CPPPATH,
  69. LOCAL_CCFLAGS = LOCAL_CCFLAGS,
  70. LOCAL_ASFLAGS = LOCAL_ASFLAGS,
  71. CPPDEFINES = CPPDEFINES,
  72. LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
  73. LIBS = LIBS,
  74. LIBPATH = LIBPATH,
  75. LINKFLAGS = LINKFLAGS)
  76. Return("objs")
  77. #---------------------------------------------------------------------------------
  78. # End
  79. #---------------------------------------------------------------------------------