SConscript 1001 B

12345678910111213141516171819202122232425262728293031323334
  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('port/modules/*.c')
  12. src += Glob('port/modules/machine/*.c')
  13. src += Glob('port/modules/user/*.c')
  14. src += Glob('lib/netutils/*.c')
  15. src += Glob('lib/timeutils/*.c')
  16. src += Glob('drivers/bus/*.c')
  17. src += Glob('port/native/*.c')
  18. path = [cwd + '/']
  19. path += [cwd + '/port']
  20. path += [cwd + '/port/modules']
  21. path += [cwd + '/port/modules/machine']
  22. LOCAL_CCFLAGS = ''
  23. if rtconfig.PLATFORM in ['gcc', 'armclang']:
  24. LOCAL_CCFLAGS += ' -std=gnu99'
  25. elif rtconfig.PLATFORM in ['keil']:
  26. LOCAL_CCFLAGS += ' --c99 --gnu'
  27. group = DefineGroup('MicroPython', src, depend = ['PKG_USING_MICROPYTHON'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  28. Return('group')