SConscript 779 B

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