OSDN Git Service

Android.bp: fix mesa include path
[android-x86/external-minigbm.git] / Android.bp
index 02e8e5d..71f6d39 100644 (file)
@@ -6,39 +6,52 @@ cc_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"],
 
-    vendor: true,
+    multilib: {
+        lib32: {
+            cflags: ["-DDRI_DRIVER_DIR=/vendor/lib/dri"],
+        },
+        lib64: {
+            cflags: ["-DDRI_DRIVER_DIR=/vendor/lib64/dri"],
+        },
+    },
+}
+
+cc_defaults {
+    name: "minigbm_cros_gralloc_defaults",
+
+    defaults: ["minigbm_defaults"],
 
     header_libs: [
         "libhardware_headers",
@@ -54,6 +67,20 @@ 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"],
+
+    whole_static_libs: ["libmesa_loader"],
+
+    export_static_lib_headers: ["libarect"],
+
+    vendor: true,
+
     shared_libs: [
         "libcutils",
         "libdrm",
@@ -61,31 +88,14 @@ cc_defaults {
         "libsync",
         "liblog",
     ],
-
-    static_libs: ["libarect"],
-
-    export_static_lib_headers: ["libarect"],
 }
 
 cc_defaults {
-    name: "minigbm_cros_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",
     ],
@@ -106,6 +116,7 @@ cc_library_shared {
     name: "gralloc.minigbm",
     defaults: ["minigbm_cros_gralloc_defaults"],
     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
+    relative_install_path: "hw",
 }
 
 cc_library_shared {
@@ -120,6 +131,7 @@ cc_library_shared {
             enabled: true,
         },
     },
+    relative_install_path: "hw",
     cflags: ["-DDRV_I915"],
     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
 }
@@ -127,6 +139,7 @@ cc_library_shared {
 cc_library_shared {
     name: "gralloc.minigbm_meson",
     defaults: ["minigbm_cros_gralloc_defaults"],
+    relative_install_path: "hw",
     cflags: ["-DDRV_MESON"],
     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
-}
\ No newline at end of file
+}