SCsub 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env python
  2. Import('env')
  3. env.drivers_sources = []
  4. if 'builtin_zlib' in env and env['builtin_zlib']:
  5. SConscript("zlib/SCsub")
  6. # OS drivers
  7. SConscript('unix/SCsub')
  8. SConscript('windows/SCsub')
  9. # Sounds drivers
  10. SConscript('alsa/SCsub')
  11. SConscript('coreaudio/SCsub')
  12. SConscript('pulseaudio/SCsub')
  13. if (env["platform"] == "windows"):
  14. SConscript("rtaudio/SCsub")
  15. SConscript("wasapi/SCsub")
  16. if env['xaudio2']:
  17. SConscript("xaudio2/SCsub")
  18. # Graphics drivers
  19. if (env["platform"] != "server"):
  20. SConscript('gles3/SCsub')
  21. SConscript('gl_context/SCsub')
  22. else:
  23. SConscript('dummy/SCsub')
  24. # Core dependencies
  25. SConscript("png/SCsub")
  26. # Tools override
  27. # FIXME: Should likely be integrated in the tools/ codebase
  28. if env['tools']:
  29. SConscript("convex_decomp/SCsub")
  30. if env['vsproj']:
  31. import os
  32. path = os.getcwd()
  33. # Change directory so the path resolves correctly in the function call.
  34. os.chdir("..")
  35. env.AddToVSProject(env.drivers_sources)
  36. os.chdir(path)
  37. if env.split_drivers:
  38. env.split_lib("drivers")
  39. else:
  40. env.add_source_files(env.drivers_sources, "*.cpp")
  41. lib = env.add_library("drivers", env.drivers_sources)
  42. env.Prepend(LIBS=[lib])