2016-10-17 06:50:25 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2020-03-30 06:28:32 +00:00
|
|
|
Import("env")
|
2015-05-03 21:18:56 +00:00
|
|
|
|
2016-10-30 17:57:40 +00:00
|
|
|
env.drivers_sources = []
|
2016-05-21 23:07:32 +00:00
|
|
|
|
2016-10-15 10:39:28 +00:00
|
|
|
# OS drivers
|
2020-03-30 06:28:32 +00:00
|
|
|
SConscript("unix/SCsub")
|
|
|
|
SConscript("windows/SCsub")
|
2016-10-15 10:39:28 +00:00
|
|
|
|
|
|
|
# Sounds drivers
|
2020-03-30 06:28:32 +00:00
|
|
|
SConscript("alsa/SCsub")
|
|
|
|
SConscript("coreaudio/SCsub")
|
|
|
|
SConscript("pulseaudio/SCsub")
|
|
|
|
if env["platform"] == "windows":
|
2017-08-27 17:01:34 +00:00
|
|
|
SConscript("wasapi/SCsub")
|
2020-03-30 06:28:32 +00:00
|
|
|
if env["xaudio2"]:
|
2016-10-31 23:24:30 +00:00
|
|
|
SConscript("xaudio2/SCsub")
|
2016-10-15 10:39:28 +00:00
|
|
|
|
2018-07-14 12:11:28 +00:00
|
|
|
# Midi drivers
|
2020-03-30 06:28:32 +00:00
|
|
|
SConscript("alsamidi/SCsub")
|
|
|
|
SConscript("coremidi/SCsub")
|
|
|
|
SConscript("winmidi/SCsub")
|
2018-07-14 12:11:28 +00:00
|
|
|
|
2016-10-15 10:39:28 +00:00
|
|
|
# Graphics drivers
|
2020-03-30 06:28:32 +00:00
|
|
|
if env["platform"] != "server":
|
|
|
|
SConscript("gles3/SCsub")
|
|
|
|
SConscript("gles2/SCsub")
|
|
|
|
SConscript("gl_context/SCsub")
|
2017-12-26 19:36:18 +00:00
|
|
|
else:
|
2020-03-30 06:28:32 +00:00
|
|
|
SConscript("dummy/SCsub")
|
2015-05-03 21:18:56 +00:00
|
|
|
|
2016-10-15 10:39:28 +00:00
|
|
|
# Core dependencies
|
2016-10-31 23:24:30 +00:00
|
|
|
SConscript("png/SCsub")
|
2016-10-15 10:39:28 +00:00
|
|
|
|
2020-03-30 06:28:32 +00:00
|
|
|
if env["vsproj"]:
|
2017-11-19 20:55:38 +00:00
|
|
|
import os
|
2020-03-30 06:28:32 +00:00
|
|
|
|
2017-11-19 20:55:38 +00:00
|
|
|
path = os.getcwd()
|
|
|
|
# Change directory so the path resolves correctly in the function call.
|
|
|
|
os.chdir("..")
|
2016-10-30 17:44:57 +00:00
|
|
|
env.AddToVSProject(env.drivers_sources)
|
2017-11-19 20:55:38 +00:00
|
|
|
os.chdir(path)
|
2015-05-03 21:18:56 +00:00
|
|
|
|
2019-12-09 18:22:08 +00:00
|
|
|
env.add_source_files(env.drivers_sources, "*.cpp")
|
|
|
|
|
|
|
|
lib = env.add_library("drivers", env.drivers_sources)
|
|
|
|
env.Prepend(LIBS=[lib])
|