SConscript 759 B

12345678910111213141516171819202122232425262728
  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. src += Glob('lib/timeutils/*.c')
  13. src += Glob('drivers/bus/*.c')
  14. path = [cwd + '/']
  15. path += [cwd + '/port']
  16. LOCAL_CCFLAGS = ''
  17. if rtconfig.CROSS_TOOL == 'gcc':
  18. LOCAL_CCFLAGS += ' -std=c99'
  19. elif rtconfig.CROSS_TOOL == 'keil':
  20. LOCAL_CCFLAGS += ' --c99 --gnu'
  21. group = DefineGroup('MicroPython', src, depend = ['PKG_USING_MICROPYTHON'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  22. Return('group')