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