SConscript 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. LOCAL_CPPPATH = []
  46. LOCAL_CCFLAGS = ""
  47. LOCAL_ASFLAGS = ""
  48. CPPPATH = [GetCurrentDir(), os.path.join(GetCurrentDir(), 'inc')]
  49. CCFLAGS = ""
  50. ASFLAGS = ""
  51. CPPDEFINES = []
  52. LOCAL_CPPDEFINES = []
  53. LIBS = []
  54. LIBPATH = []
  55. LINKFLAGS = ""
  56. SOURCES_IGNORE = []
  57. CPPPATH_IGNORE = []
  58. #---------------------------------------------------------------------------------
  59. # Main target
  60. #---------------------------------------------------------------------------------
  61. objs = DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
  62. CPPPATH = CPPPATH,
  63. CCFLAGS = CCFLAGS,
  64. ASFLAGS = ASFLAGS,
  65. LOCAL_CPPPATH = LOCAL_CPPPATH,
  66. LOCAL_CCFLAGS = LOCAL_CCFLAGS,
  67. LOCAL_ASFLAGS = LOCAL_ASFLAGS,
  68. CPPDEFINES = CPPDEFINES,
  69. LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
  70. LIBS = LIBS,
  71. LIBPATH = LIBPATH,
  72. LINKFLAGS = LINKFLAGS)
  73. Return("objs")
  74. #---------------------------------------------------------------------------------
  75. # End
  76. #---------------------------------------------------------------------------------