OSDN Git Service

gralloc0_register_buffer: initialize gralloc0 when needed
[android-x86/external-minigbm.git] / Android.mk
index 03197bf..9023fdf 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-ifeq ($(strip $(BOARD_USES_MINIGBM)), true)
+ifeq ($(strip $(BOARD_USES_MINIGBM_INTEL)), true)
 
 MINIGBM_GRALLOC_MK := $(call my-dir)/Android.gralloc.mk
 LOCAL_PATH := $(call my-dir)
@@ -13,8 +13,9 @@ SUBDIRS := cros_gralloc
 
 LOCAL_SHARED_LIBRARIES := \
        libcutils \
+       liblog \
        libdrm \
-       liblog
+       libsync
 
 LOCAL_SRC_FILES := \
        amdgpu.c \
@@ -25,6 +26,7 @@ LOCAL_SRC_FILES := \
        gma500.c \
        helpers.c \
        i915.c \
+       i915_private.c \
        marvell.c \
        mediatek.c \
        nouveau.c \
@@ -37,10 +39,16 @@ LOCAL_SRC_FILES := \
 
 include $(MINIGBM_GRALLOC_MK)
 
-LOCAL_CPPFLAGS += -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
+LOCAL_CPPFLAGS += -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
+                  -Wno-switch -Wno-format -Wno-unused-variable
 LOCAL_CFLAGS += -Wall -Wsign-compare -Wpointer-arith \
                -Wcast-qual -Wcast-align \
-               -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
+               -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
+               -Wno-unused-value -Wno-unused-parameter -Wno-typedef-redefinition
+
+LOCAL_C_INCLUDES += frameworks/native/libs/nativebase/include \
+                    frameworks/native/libs/nativewindow/include \
+                    frameworks/native/libs/arect/include \
 
 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
 LOCAL_CPPFLAGS += -DDRV_I915
@@ -48,7 +56,15 @@ LOCAL_CFLAGS += -DDRV_I915
 LOCAL_SHARED_LIBRARIES += libdrm_intel
 endif
 
-LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
+LOCAL_SHARED_LIBRARIES += libnativewindow
+LOCAL_STATIC_LIBRARIES += libarect
+LOCAL_HEADER_LIBRARIES += libnativebase_headers libsystem_headers libhardware_headers libutils_headers
+LOCAL_CFLAGS += -DUSE_VNDK
+endif
+
+LOCAL_CFLAGS += -Wno-error
+LOCAL_MODULE := gralloc.intel
 LOCAL_MODULE_TAGS := optional
 # The preferred path for vendor HALs is /vendor/lib/hw
 LOCAL_PROPRIETARY_MODULE := true