| # Copyright 2016 Google, LLC |
| # |
| # Permission is hereby granted, free of charge, to any person obtaining a |
| # copy of this software and associated documentation files (the "Software"), |
| # to deal in the Software without restriction, including without limitation |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| # and/or sell copies of the Software, and to permit persons to whom the |
| # Software is furnished to do so, subject to the following conditions: |
| # |
| # The above copyright notice and this permission notice (including the next |
| # paragraph) shall be included in all copies or substantial portions of the |
| # Software. |
| # |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| # IN THE SOFTWARE. |
| |
| import("../../mesa.gni") |
| |
| config("util_public_config") { |
| include_dirs = [ |
| "$mesa_build_root/src", |
| "$mesa_build_root/src/gallium/auxiliary/", |
| "$mesa_build_root/src/gallium/include/", |
| ] |
| } |
| |
| mesa_source_set("headers") { |
| public_configs = [ ":util_public_config" ] |
| |
| sources = [ |
| "bitset.h", |
| "blob.h", |
| "build_id.h", |
| "debug.h", |
| "double.h", |
| "fast_idiv_by_const.h", |
| "format_srgb.h", |
| "futex.h", |
| "half_float.h", |
| "hash_table.h", |
| "inflight_list.h", |
| "list.h", |
| "log.h", |
| "macros.h", |
| "magma_wait.h", |
| "memstream.h", |
| "mesa-sha1.h", |
| "os_dirent.h", |
| "os_file.h", |
| "os_misc.h", |
| "os_time.h", |
| "ralloc.h", |
| "register_allocate.h", |
| "rgtc.h", |
| "rounding.h", |
| "set.h", |
| "sha1/sha1.h", |
| "simple_list.h", |
| "softfloat.h", |
| "sparse_array.h", |
| "strndup.h", |
| "strtod.h", |
| "texcompress_rgtc_tmp.h", |
| "u_atomic.h", |
| "u_cpu_detect.h", |
| "u_debug.h", |
| "u_printf.h", |
| "u_vector.h", |
| "vma.h", |
| ] |
| configs = [ "//build/config:Wno-conversion" ] |
| } |
| |
| mesa_source_set("util") { |
| include_dirs = [ |
| "$mesa_build_root/src/util", |
| "$mesa_build_root/src/mesa/", |
| "$mesa_build_root/src/mapi/", |
| "$mesa_build_root/src/gallium/auxiliary/", |
| ] |
| |
| public_deps = [ |
| ":gen", |
| ":headers", |
| "$magma_build_root/include:magma", |
| "$mesa_build_root/include:c_compat", |
| ] |
| |
| public_configs = [ ":util_public_config" ] |
| |
| sources = [ |
| "anon_file.h", |
| "blob.c", |
| "build_id.c", |
| "debug.c", |
| "double.c", |
| "fast_idiv_by_const.c", |
| "half_float.c", |
| "hash_table.c", |
| "inflight_list.c", |
| "log.c", |
| "magma_wait.c", |
| "memstream.c", |
| "mesa-sha1.c", |
| "os_file.c", |
| "os_misc.c", |
| "os_time.c", |
| "ralloc.c", |
| "register_allocate.c", |
| "rgtc.c", |
| "set.c", |
| "sha1/sha1.c", |
| "softfloat.c", |
| "sparse_array.c", |
| "strtod.c", |
| "u_cpu_detect.c", |
| "u_debug.c", |
| "u_printf.cpp", |
| "u_vector.c", |
| "vma.c", |
| ] |
| |
| deps = [] |
| |
| if (current_os == "fuchsia") { |
| sources += [ |
| "futex_fuchsia.c", |
| "os_dirent_fuchsia.cpp", |
| ] |
| deps += [ |
| "$mesa_build_root/src/os", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/zxio", |
| "//zircon/system/ulib/syslog:syslog-static", |
| ] |
| } else { |
| sources += [ "anon_file.c" ] |
| } |
| configs = [ "//build/config:Wno-conversion" ] |
| } |
| |
| mesa_python_stdout_to_file_action("format_srgb") { |
| output = "format_srgb.c" |
| script = "format_srgb.py" |
| } |
| |
| config("gen_public_config") { |
| include_dirs = [ target_gen_dir ] |
| } |
| |
| mesa_source_set("gen") { |
| public_configs = [ ":gen_public_config" ] |
| |
| deps = [ |
| ":format_srgb", |
| "$mesa_build_root/include:c_compat", |
| ] |
| |
| include_dirs = [ "." ] |
| |
| sources = [ "$target_gen_dir/format_srgb.c" ] |
| configs = [ "//build/config:Wno-conversion" ] |
| } |