2023-12-14 21:54:22 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
Import("env")
|
|
|
|
|
|
|
|
thirdparty_obj = []
|
|
|
|
|
|
|
|
if env["platform"] in ["haiku", "osx", "windows", "x11"]:
|
|
|
|
# Thirdparty source files
|
2023-12-16 22:23:51 +01:00
|
|
|
thirdparty_dir = "glad/"
|
2023-12-14 21:54:22 +01:00
|
|
|
thirdparty_sources = [
|
|
|
|
"glad.c",
|
|
|
|
]
|
|
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
|
|
|
|
env.Prepend(CPPPATH=[thirdparty_dir])
|
|
|
|
|
|
|
|
env.Append(CPPDEFINES=["GLAD_ENABLED"])
|
|
|
|
env.Append(CPPDEFINES=["GLES_OVER_GL"])
|
|
|
|
|
|
|
|
env_thirdparty = env.Clone()
|
|
|
|
env_thirdparty.disable_warnings()
|
|
|
|
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
|
|
|
|
env.drivers_sources += thirdparty_obj
|
|
|
|
|
|
|
|
|
|
|
|
# Pandemonium source files
|
|
|
|
|
|
|
|
driver_obj = []
|
|
|
|
|
|
|
|
env.add_source_files(driver_obj, "*.cpp")
|
|
|
|
env.drivers_sources += driver_obj
|
|
|
|
|
|
|
|
# Needed to force rebuilding the driver files when the thirdparty code is updated.
|
|
|
|
env.Depends(driver_obj, thirdparty_obj)
|