Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 1 | // Use of this source code is governed by a BSD-style license that can be |
| 2 | // found in the LICENSE file. |
| 3 | |
| 4 | cc_defaults { |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 5 | name: "minigbm_defaults", |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 6 | |
| 7 | srcs: [ |
| 8 | "amdgpu.c", |
| 9 | "drv.c", |
| 10 | "evdi.c", |
| 11 | "exynos.c", |
| 12 | "helpers_array.c", |
| 13 | "helpers.c", |
| 14 | "i915.c", |
| 15 | "marvell.c", |
| 16 | "mediatek.c", |
| 17 | "meson.c", |
| 18 | "msm.c", |
| 19 | "nouveau.c", |
| 20 | "radeon.c", |
| 21 | "rockchip.c", |
| 22 | "tegra.c", |
| 23 | "udl.c", |
| 24 | "vc4.c", |
| 25 | "vgem.c", |
| 26 | "virtio_gpu.c", |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 27 | ], |
| 28 | |
| 29 | cflags: [ |
| 30 | "-D_GNU_SOURCE=1", |
| 31 | "-D_FILE_OFFSET_BITS=64", |
| 32 | "-Wall", |
| 33 | "-Wsign-compare", |
| 34 | "-Wpointer-arith", |
| 35 | "-Wcast-qual", |
| 36 | "-Wcast-align", |
| 37 | "-Wno-unused-parameter", |
| 38 | ], |
| 39 | cppflags: ["-std=c++14"], |
| 40 | |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 41 | vendor: true, |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 42 | |
| 43 | header_libs: [ |
| 44 | "libhardware_headers", |
| 45 | "libnativebase_headers", |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 46 | "libnativewindow_headers", |
| 47 | "libsystem_headers", |
| 48 | ], |
| 49 | |
| 50 | export_header_lib_headers: [ |
| 51 | "libhardware_headers", |
| 52 | "libnativebase_headers", |
| 53 | "libnativewindow_headers", |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 54 | "libsystem_headers", |
| 55 | ], |
| 56 | |
| 57 | shared_libs: [ |
| 58 | "libcutils", |
| 59 | "libdrm", |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 60 | "libnativewindow", |
| 61 | "libsync", |
| 62 | "liblog", |
| 63 | ], |
| 64 | |
| 65 | static_libs: ["libarect"], |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 66 | |
| 67 | export_static_lib_headers: ["libarect"], |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 68 | } |
| 69 | |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 70 | cc_defaults { |
| 71 | name: "minigbm_cros_gralloc_defaults", |
| 72 | |
| 73 | defaults: ["minigbm_defaults"], |
| 74 | |
| 75 | srcs: [ |
| 76 | "cros_gralloc/cros_gralloc_buffer.cc", |
| 77 | "cros_gralloc/cros_gralloc_helpers.cc", |
| 78 | "cros_gralloc/cros_gralloc_driver.cc", |
| 79 | ] |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 80 | } |
| 81 | |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 82 | cc_library_static { |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 83 | name: "libminigbm", |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 84 | defaults: ["minigbm_defaults"], |
Colin Cross | 9521a60 | 2019-03-22 13:15:06 -0700 | [diff] [blame] | 85 | shared_libs: ["liblog"], |
| 86 | static_libs: ["libdrm"], |
| 87 | |
| 88 | srcs: [ |
| 89 | "gbm.c", |
| 90 | "gbm_helpers.c", |
| 91 | ], |
| 92 | |
| 93 | export_include_dirs: ["."], |
| 94 | } |
Marissa Wall | 1476c7e | 2020-01-24 15:05:57 -0800 | [diff] [blame] | 95 | |
| 96 | cc_library_static { |
| 97 | name: "libminigbm_cros_gralloc", |
| 98 | defaults: ["minigbm_cros_gralloc_defaults"], |
| 99 | shared_libs: ["liblog"], |
| 100 | static_libs: ["libdrm"], |
| 101 | |
| 102 | export_include_dirs: ["."], |
| 103 | } |
| 104 | |
| 105 | cc_library_shared { |
| 106 | name: "gralloc.minigbm", |
| 107 | defaults: ["minigbm_cros_gralloc_defaults"], |
| 108 | srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], |
| 109 | } |
| 110 | |
| 111 | cc_library_shared { |
| 112 | name: "gralloc.minigbm_intel", |
| 113 | defaults: ["minigbm_cros_gralloc_defaults"], |
| 114 | enabled: false, |
| 115 | arch: { |
| 116 | x86: { |
| 117 | enabled: true, |
| 118 | }, |
| 119 | x86_64: { |
| 120 | enabled: true, |
| 121 | }, |
| 122 | }, |
| 123 | cflags: ["-DDRV_I915"], |
| 124 | srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], |
| 125 | } |
| 126 | |
| 127 | cc_library_shared { |
| 128 | name: "gralloc.minigbm_meson", |
| 129 | defaults: ["minigbm_cros_gralloc_defaults"], |
| 130 | cflags: ["-DDRV_MESON"], |
| 131 | srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], |
| 132 | } |