X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=Android.bp;h=c33388032419cc695d035586d0b9b6dae00abd3f;hb=21d6fa9f48e5901c55fc18ffc049fc34201609e2;hp=bd7a6396a8332bbe069878d7173505ca426abb37;hpb=f034387461f3aad856f239dd5c0ae70f5a4e3111;p=android-x86%2Fexternal-minigbm.git diff --git a/Android.bp b/Android.bp index bd7a639..c333880 100644 --- a/Android.bp +++ b/Android.bp @@ -1,8 +1,5 @@ -/* - * Copyright 2020 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. cc_defaults { name: "minigbm_defaults", @@ -10,22 +7,16 @@ cc_defaults { srcs: [ "amdgpu.c", "drv.c", - "evdi.c", + "dumb_driver.c", "exynos.c", "helpers_array.c", "helpers.c", "i915.c", - "marvell.c", "mediatek.c", - "meson.c", "msm.c", - "nouveau.c", - "radeon.c", "rockchip.c", "tegra.c", - "udl.c", "vc4.c", - "vgem.c", "virtio_gpu.c", ], @@ -41,8 +32,12 @@ cc_defaults { ], cppflags: ["-std=c++14"], +} - vendor: true, +cc_defaults { + name: "minigbm_cros_gralloc_defaults", + + defaults: ["minigbm_defaults"], header_libs: [ "libhardware_headers", @@ -58,6 +53,18 @@ cc_defaults { "libsystem_headers", ], + srcs: [ + "cros_gralloc/cros_gralloc_buffer.cc", + "cros_gralloc/cros_gralloc_helpers.cc", + "cros_gralloc/cros_gralloc_driver.cc", + ], + + static_libs: ["libarect"], + + export_static_lib_headers: ["libarect"], + + vendor: true, + shared_libs: [ "libcutils", "libdrm", @@ -65,31 +72,14 @@ cc_defaults { "libsync", "liblog", ], - - static_libs: ["libarect"], - - export_static_lib_headers: ["libarect"], } cc_defaults { - name: "minigbm_gralloc_defaults", + name: "gbm_defaults", defaults: ["minigbm_defaults"], srcs: [ - "cros_gralloc/cros_gralloc_buffer.cc", - "cros_gralloc/cros_gralloc_helpers.cc", - "cros_gralloc/cros_gralloc_driver.cc", - ] -} - -cc_library_static { - name: "libminigbm", - defaults: ["minigbm_defaults"], - shared_libs: ["liblog"], - static_libs: ["libdrm"], - - srcs: [ "gbm.c", "gbm_helpers.c", ], @@ -97,9 +87,31 @@ cc_library_static { export_include_dirs: ["."], } +cc_library { + name: "libgbm", + defaults: ["gbm_defaults"], + host_supported: true, + + target: { + host: { + // Avoid linking to another host copy of libdrm; this library will cause + // binary GPU drivers to be loaded from the host, which might be linked + // to a system copy of libdrm, which conflicts with the AOSP one + allow_undefined_symbols: true, + header_libs: ["libdrm"], + }, + android: { + shared_libs: [ + "libdrm", + "liblog" + ], + }, + }, +} + cc_library_static { - name: "libminigbm_gralloc", - defaults: ["minigbm_gralloc_defaults"], + name: "libminigbm_cros_gralloc", + defaults: ["minigbm_cros_gralloc_defaults"], shared_libs: ["liblog"], static_libs: ["libdrm"], @@ -108,13 +120,13 @@ cc_library_static { cc_library_shared { name: "gralloc.minigbm", - defaults: ["minigbm_gralloc_defaults"], + defaults: ["minigbm_cros_gralloc_defaults"], srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], } cc_library_shared { name: "gralloc.minigbm_intel", - defaults: ["minigbm_gralloc_defaults"], + defaults: ["minigbm_cros_gralloc_defaults"], enabled: false, arch: { x86: { @@ -130,7 +142,7 @@ cc_library_shared { cc_library_shared { name: "gralloc.minigbm_meson", - defaults: ["minigbm_gralloc_defaults"], + defaults: ["minigbm_cros_gralloc_defaults"], cflags: ["-DDRV_MESON"], srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], -} \ No newline at end of file +}