SCsub 1.2 KB

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