SConscript 848 B

12345678910111213141516171819202122232425262728293031
  1. from building import *
  2. import rtconfig
  3. # get current directory
  4. cwd = GetCurrentDir()
  5. # The set of source files associated with this SConscript file.
  6. src = Glob('py/*.c')
  7. src += Glob('lib/mp-readline/*.c')
  8. src += Glob('lib/utils/*.c')
  9. src += Glob('extmod/*.c')
  10. src += Glob('port/*.c')
  11. src += Glob('lib/netutils/*.c')
  12. path = [cwd + '/']
  13. path += [cwd + '/port']
  14. path += [cwd + '/lib/netutils']
  15. if rtconfig.CROSS_TOOL == 'keil':
  16. LOCAL_CCFLAGS = ' -I "port/mpy_project_cfg.h"'
  17. else :
  18. LOCAL_CCFLAGS = ' -include "port/mpy_project_cfg.h"'
  19. if rtconfig.CROSS_TOOL == 'gcc':
  20. LOCAL_CCFLAGS += ' -std=c99'
  21. elif rtconfig.CROSS_TOOL == 'keil':
  22. LOCAL_CCFLAGS += ' --c99'
  23. group = DefineGroup('MicroPython', src, depend = ['PKG_USING_MICROPYTHON'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  24. Return('group')