SConscript 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # File : SConscript
  3. # This file is part of RT-Thread RTOS/WebNet Server
  4. # COPYRIGHT (C) 2011, Shanghai Real-Thread Technology Co., Ltd
  5. #
  6. # All rights reserved.
  7. #
  8. # Change Logs:
  9. # Date Author Notes
  10. # 2011-08-02 Bernard the first version
  11. #
  12. Import('RTT_ROOT')
  13. from building import *
  14. cwd = GetCurrentDir()
  15. src = Split("""
  16. src/webnet.c
  17. src/wn_mimetype.c
  18. src/wn_request.c
  19. src/wn_session.c
  20. src/wn_utils.c
  21. src/wn_module.c
  22. """)
  23. if GetDepend(['WEBNET_USING_ASP']):
  24. src += Glob('module/wn_module_asp.c')
  25. if GetDepend(['WEBNET_USING_AUTH']):
  26. src += Glob('module/wn_module_auth.c')
  27. if GetDepend(['WEBNET_USING_CGI']):
  28. src += Glob('module/wn_module_cgi.c')
  29. if GetDepend(['WEBNET_USING_INDEX']):
  30. src += Glob('module/wn_module_index.c')
  31. if GetDepend(['WEBNET_USING_ALIAS']):
  32. src += Glob('module/wn_module_alias.c')
  33. if GetDepend(['WEBNET_USING_LOG']):
  34. src += Glob('module/wn_module_log.c')
  35. if GetDepend(['WEBNET_USING_UPLOAD']):
  36. src += Glob('module/wn_module_upload.c')
  37. if GetDepend(['WEBNET_USING_SSI']):
  38. src += Glob('module/wn_module_ssi.c')
  39. if GetDepend(['WEBNET_USING_DAV']):
  40. src += Glob('module/wn_module_dav.c')
  41. if GetDepend(['WEBNET_USING_SAMPLES']):
  42. src += Glob('samples/wn_sample.c')
  43. if GetDepend(['WEBNET_USING_SAMPLES']) and GetDepend(['WEBNET_USING_UPLOAD']):
  44. src += Glob('samples/wn_sample_upload.c')
  45. CPPPATH = [cwd + '/inc']
  46. group = DefineGroup('WebNet', src, depend = ['PKG_USING_WEBNET'], CPPPATH = CPPPATH)
  47. Return('group')