SConscript 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. from building import *
  2. import rtconfig
  3. import os
  4. src = []
  5. LIBS = ['']
  6. LIBPATH = ['']
  7. cwd = GetCurrentDir()
  8. lib_path = os.path.join(cwd, 'libs')
  9. LIBPATH += [lib_path]
  10. if rtconfig.CROSS_TOOL == 'gcc':
  11. LIBS += ['libjoylink_2.0.19.1_armcm3_gcc']
  12. elif rtconfig.CROSS_TOOL == 'keil':
  13. LIBS += ['libjoylink_2.0.19.1_armcm3_keil']
  14. path = [cwd + '/inc']
  15. path += [cwd + '/inc/joylink']
  16. path += [cwd + '/inc/auth']
  17. path += [cwd + '/inc/json']
  18. path += [cwd + '/inc/list']
  19. path += [cwd + '/inc/config']
  20. path += [cwd + '/inc/softap']
  21. # sample files
  22. if GetDepend(['JOYLINK_USING_SAMPLES_BAND']):
  23. src += Glob('samples/joylink_sample_band.c')
  24. if GetDepend(['JOYLINK_USING_SAMPLES_HEATER']):
  25. src += Glob('samples/joylink_sample_heater.c')
  26. CPPDEFINES = ['__RT_THREAD__']
  27. CPPDEFINES += ['_GET_HOST_BY_NAME_']
  28. if GetDepend(['JOYLINK_USING_SOFTAP']):
  29. CPPDEFINES += ['_IS_DEV_REQUEST_ACTIVE_SUPPORTED_']
  30. group = DefineGroup('joylink', src, depend = ['PKG_USING_JOYLINK'], CPPPATH = path, LIBS = LIBS, LIBPATH = LIBPATH, CPPDEFINES = CPPDEFINES)
  31. list = os.listdir(cwd)
  32. for item in list:
  33. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  34. group = group + SConscript(os.path.join(item, 'SConscript'))
  35. Return('group')