+cc_defaults {
+ name: "gbm_defaults",
+
+ defaults: ["minigbm_defaults"],
+
+ srcs: [
+ "gbm.c",
+ "gbm_helpers.c",
+ ],
+
+ 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_cros_gralloc",
+ defaults: ["minigbm_cros_gralloc_defaults"],
+ shared_libs: ["liblog"],
+ static_libs: ["libdrm"],
+
+ export_include_dirs: ["."],