0.2.0-dev Download ZIP
45 lines ·971 B Raw
| 1 | #!/usr/bin/env python |
| 2 | from misc.utility.scons_hints import * |
| 3 | |
| 4 | Import("env") |
| 5 | |
| 6 | env_backtrace = env.Clone() |
| 7 | |
| 8 | # Thirdparty source files |
| 9 | |
| 10 | thirdparty_obj = [] |
| 11 | |
| 12 | thirdparty_dir = "#thirdparty/libbacktrace/" |
| 13 | thirdparty_sources = [ |
| 14 | "atomic.c", |
| 15 | "dwarf.c", |
| 16 | "fileline.c", |
| 17 | "posix.c", |
| 18 | "print.c", |
| 19 | "sort.c", |
| 20 | "state.c", |
| 21 | "backtrace.c", |
| 22 | "simple.c", |
| 23 | "pecoff.c", |
| 24 | "read.c", |
| 25 | "alloc.c", |
| 26 | ] |
| 27 | thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 28 | |
| 29 | env_backtrace.Prepend(CPPPATH=[thirdparty_dir]) |
| 30 | |
| 31 | env_thirdparty = env_backtrace.Clone() |
| 32 | env_thirdparty.disable_warnings() |
| 33 | env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) |
| 34 | |
| 35 | env.drivers_sources += thirdparty_obj |
| 36 | |
| 37 | # Godot source files |
| 38 | |
| 39 | driver_obj = [] |
| 40 | |
| 41 | env_backtrace.add_source_files(driver_obj, "*.cpp") |
| 42 | env.drivers_sources += driver_obj |
| 43 | |
| 44 | # Needed to force rebuilding the driver files when the thirdparty library is updated. |
| 45 | env.Depends(driver_obj, thirdparty_obj) |