SCsub 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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("wasapi/SCsub")
  13. if env['xaudio2']:
  14. SConscript("xaudio2/SCsub")
  15. # Midi drivers
  16. SConscript('alsamidi/SCsub')
  17. SConscript('coremidi/SCsub')
  18. SConscript('winmidi/SCsub')
  19. # Graphics drivers
  20. if (env["platform"] != "server"):
  21. SConscript('gles3/SCsub')
  22. SConscript('gles2/SCsub')
  23. SConscript('gl_context/SCsub')
  24. else:
  25. SConscript('dummy/SCsub')
  26. # Core dependencies
  27. SConscript("png/SCsub")
  28. # Tools override
  29. # FIXME: Should likely be integrated in the tools/ codebase
  30. if env['tools']:
  31. SConscript("convex_decomp/SCsub")
  32. if env['vsproj']:
  33. import os
  34. path = os.getcwd()
  35. # Change directory so the path resolves correctly in the function call.
  36. os.chdir("..")
  37. env.AddToVSProject(env.drivers_sources)
  38. os.chdir(path)
  39. env.add_source_files(env.drivers_sources, "*.cpp")
  40. lib = env.add_library("drivers", env.drivers_sources)
  41. env.Prepend(LIBS=[lib])