SConscript 682 B

12345678910111213141516171819202122232425
  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. path = [cwd + '/']
  12. path += [cwd + '/port']
  13. LOCAL_CCFLAGS = ' -include "port/mpy_project_cfg.h"'
  14. if rtconfig.CROSS_TOOL == 'gcc':
  15. LOCAL_CCFLAGS += ' -std=c99'
  16. elif rtconfig.CROSS_TOOL == 'keil':
  17. LOCAL_CCFLAGS += ' --c99'
  18. group = DefineGroup('MicroPython', src, depend = ['PKG_USING_MICROPYTHON'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  19. Return('group')