SConscript 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. from building import *
  2. import rtconfig
  3. # get current dir path
  4. cwd = GetCurrentDir()
  5. # init src and inc vars
  6. inc = []
  7. src = []
  8. # libs = ['libmpllib']
  9. # LIBPATH = [cwd + '/mpl']
  10. # add common include
  11. inc = inc + [cwd]
  12. inc = inc + [cwd + "/driver/eMPL"]
  13. inc = inc + [cwd + "/driver/include"]
  14. inc = inc + [cwd + "/driver/stm32L"]
  15. inc = inc + [cwd + "/eMPL-hal"]
  16. inc = inc + [cwd + "/mllite"]
  17. inc = inc + [cwd + "/mpl"] # only support M0 M3 M4 M4f
  18. # add basic code
  19. src = src + Glob('./driver/eMPL/*.c')
  20. src = src + Glob('./driver/stm32L/*.c')
  21. src = src + Glob('./eMPL-hal/*.c')
  22. src = src + Glob('./mllite/*.c')
  23. LOCAL_CCFLAGS = ''
  24. if rtconfig.CROSS_TOOL == 'gcc':
  25. LOCAL_CCFLAGS += ' -std=c99'
  26. elif rtconfig.CROSS_TOOL == 'keil':
  27. LOCAL_CCFLAGS += ' --c99 --gnu -g -W'
  28. # group = DefineGroup('MotionDriver', src, depend = ['PKG_USING_MOTIONDRIVER2RTT'], CPPPATH = inc, LOCAL_CCFLAGS = LOCAL_CCFLAGS, LIBS = libs, LIBPATH = LIBPATH)
  29. group = DefineGroup('MotionDriver', src, depend = ['PKG_USING_MOTIONDRIVER2RTT'], CPPPATH = inc, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  30. Return('group')