SConscript 704 B

1234567891011121314151617181920212223242526
  1. import os
  2. from building import *
  3. # The set of source files associated with this SConscript file.
  4. src = []
  5. cwd = GetCurrentDir()
  6. root = str(Dir('#'))
  7. packages = os.path.join(root, 'packages')
  8. file_list = os.listdir(packages)
  9. for f in file_list:
  10. if(f.split('-')[0] == 'TensorflowLiteMicro'):
  11. tflite = os.path.join(packages, f)
  12. break
  13. CPPPATH = [cwd, tflite]
  14. if GetDepend('PKG_USING_TENSORFLOWLITEMICRO_REFERENCE'):
  15. src += Glob('*.cc') + Glob('reference/*.cc')
  16. if GetDepend('PKG_USING_TENSORFLOWLITEMICRO_CMSISNN'):
  17. src += Glob('*.cc') + Glob('cmsis-nn/*.cc')
  18. group = DefineGroup('lite', src, depend = ['PKG_USING_TENSORFLOWLITEMICRO'], CPPPATH = CPPPATH)
  19. Return('group')