X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=Android.bp;h=71f6d39d02ddc007e678a174d59215e2e7ee8e1e;hb=82d4e88590b4febd832c2184bcc2b1cd25493c42;hp=c3b56e5ba955c15cf387cb967c42d6d678bd14d2;hpb=8884508fa662f8e2b11ea1639006fb0e17d65483;p=android-x86%2Fexternal-minigbm.git diff --git a/Android.bp b/Android.bp index c3b56e5..71f6d39 100644 --- a/Android.bp +++ b/Android.bp @@ -1,50 +1,55 @@ -/* - * 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", srcs: [ "amdgpu.c", + "dri.c", + "dri_generic_driver.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", + "cros_gralloc/gralloc0/drm_framebuffer.c", ], + include_dirs: ["external/mesa/include"], + cflags: [ + "-DDRI_GENERIC_DRV", "-D_GNU_SOURCE=1", "-D_FILE_OFFSET_BITS=64", "-Wall", "-Wsign-compare", "-Wpointer-arith", - "-Wcast-qual", "-Wcast-align", "-Wno-unused-parameter", ], cppflags: ["-std=c++14"], + + multilib: { + lib32: { + cflags: ["-DDRI_DRIVER_DIR=/vendor/lib/dri"], + }, + lib64: { + cflags: ["-DDRI_DRIVER_DIR=/vendor/lib64/dri"], + }, + }, } cc_defaults { - name: "minigbm_gralloc_defaults", + name: "minigbm_cros_gralloc_defaults", defaults: ["minigbm_defaults"], @@ -70,6 +75,8 @@ cc_defaults { static_libs: ["libarect"], + whole_static_libs: ["libmesa_loader"], + export_static_lib_headers: ["libarect"], vendor: true, @@ -81,8 +88,6 @@ cc_defaults { "libsync", "liblog", ], - - relative_install_path: "hw", } cc_defaults { @@ -98,31 +103,9 @@ cc_defaults { 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"], @@ -131,13 +114,14 @@ cc_library_static { cc_library_shared { name: "gralloc.minigbm", - defaults: ["minigbm_gralloc_defaults"], + defaults: ["minigbm_cros_gralloc_defaults"], srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], + relative_install_path: "hw", } cc_library_shared { name: "gralloc.minigbm_intel", - defaults: ["minigbm_gralloc_defaults"], + defaults: ["minigbm_cros_gralloc_defaults"], enabled: false, arch: { x86: { @@ -147,13 +131,15 @@ cc_library_shared { enabled: true, }, }, + relative_install_path: "hw", cflags: ["-DDRV_I915"], srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], } cc_library_shared { name: "gralloc.minigbm_meson", - defaults: ["minigbm_gralloc_defaults"], + defaults: ["minigbm_cros_gralloc_defaults"], + relative_install_path: "hw", cflags: ["-DDRV_MESON"], srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], }