blob: d99f5a51ff36314dd8d4682143ea9e3d6d48be07 [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//packages/package.gni")
import("//garnet/lib/magma/gnbuild/magma.gni")
group("vulkan") {
public_deps = [
"//third_party/vulkan_loader_and_validation_layers:vulkan",
]
}
package("magma") {
deps = []
if (build_libvulkan_arm_mali || build_intel_gen) {
deps += [
":libmagma",
":libvulkan",
]
libraries = [ {
name = "libmagma.so"
} ]
if (build_intel_gen) {
deps += [ "$msd_intel_gen_build_root:msd_intel" ]
drivers = [ {
# This driver is needed early in bootup (i.e. in the /boot partition)
# so that devmgr correctly chooses it over the intel-i915.so driver on
# hardware with supported intel GPUs.
early_boot_driver = true
name = "libmsd_intel.so"
} ]
libraries += [ {
name = "libvulkan_intel.so"
} ]
resources = [ {
path = rebase_path("icd/intel_icd.json")
dest = "vulkan/icd.d/intel_icd.json"
} ]
}
if (build_libvulkan_arm_mali) {
libraries += [ {
name = "libvulkan_arm.so"
} ]
resources = [ {
path = rebase_path("icd/arm_icd.json")
dest = "vulkan/icd.d/arm_icd.json"
} ]
}
}
if (build_msd_arm_mali) {
deps += [ "//garnet/drivers/gpu/msd-arm-mali:msd_arm" ]
drivers = [ {
name = "libmsd_arm.so"
} ]
}
}
package("magma-dev") {
testonly = true
deps = []
if (build_libvulkan_arm_mali || build_intel_gen) {
deps += [
":libmagma",
":libvulkan",
]
libraries = [ {
name = "libmagma.so"
} ]
if (target_cpu == "x64") {
deps += [ "$msd_intel_gen_build_root:msd_intel_test" ]
drivers = [ {
# This driver is needed early in bootup (i.e. in the /boot partition)
# so that devmgr correctly chooses it over the intel-i915.so driver on
# hardware with supported intel GPUs.
early_boot_driver = true
name = "libmsd_intel_test.so"
} ]
libraries += [ {
name = "libvulkan_intel.so"
} ]
resources = [ {
path = rebase_path("icd/intel_icd.json")
dest = "vulkan/icd.d/intel_icd.json"
} ]
}
if (build_libvulkan_arm_mali) {
libraries += [ {
name = "libvulkan_arm.so"
} ]
resources = [ {
path = rebase_path("icd/arm_icd.json")
dest = "vulkan/icd.d/arm_icd.json"
} ]
}
}
if (build_msd_arm_mali) {
deps += [ "//garnet/drivers/gpu/msd-arm-mali:msd_arm" ]
drivers = [ {
name = "libmsd_arm.so"
} ]
}
}
package("magma-tools") {
deps = [
":tools",
]
binaries = [ {
name = "magma_info"
} ]
}
package("vkcube") {
if (target_cpu == "x64") {
deps = [
"//garnet/lib/magma/tests/vkcube",
]
binaries = [ {
name = "vkcube"
} ]
}
}
# This config allows inclusion of headers via relative paths from src
config("magma_src_include_config") {
include_dirs = [ "src" ]
}
# This config allows inclusion of headers via relative paths from tests
config("magma_tests_include_config") {
include_dirs = [ "tests" ]
}
group("libmagma") {
public_deps = [
"src/libmagma",
]
}
if (build_intel_gen) {
group("libvulkan") {
public_deps = [
"$mesa_build_root:magma_vulkan",
]
}
} else if (build_libvulkan_arm_mali) {
group("libvulkan") {
public_deps = [
"$mali_build_root:libvulkan_arm",
]
}
}
# internal only
source_set("libmsd") {
deps = [
"src/sys_driver",
]
public_deps = [
"include:msd_abi",
]
}
group("tools") {
public_deps = [
"src/tools",
]
}