summaryrefslogtreecommitdiff
Diffstat
-rwxr-xr-xAndroid.mk10
-rw-r--r--v3/Android.mk4
2 files changed, 7 insertions, 7 deletions
diff --git a/Android.mk b/Android.mk
index e44b5ed..15e8694 100755
--- a/Android.mk
+++ b/Android.mk
@@ -1,3 +1,4 @@
+ifeq ($(MESON_GRALLOC_DIR),)
LOCAL_PATH:= $(call my-dir)
CAMHAL_V3:=true
@@ -69,11 +70,7 @@ ifeq ($(BOARD_HAVE_HW_JPEGENC),true)
LOCAL_SRC_FILES += $(CAMERA_HAL_HW_JPEGENC_SRC)
endif
-ifneq (,$(wildcard hardware/amlogic/gralloc))
-GRALLOC_DIR := hardware/amlogic/gralloc
-else
-GRALLOC_DIR := hardware/libhardware/modules/gralloc
-endif
+MESON_GRALLOC_DIR ?= hardware/amlogic/gralloc
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/inc/ \
@@ -87,7 +84,7 @@ LOCAL_C_INCLUDES += \
frameworks/native/include/media/hardware \
system/core/include/ion \
$(LOCAL_PATH)/inc/mjpeg/ \
- $(GRALLOC_DIR) \
+ $(MESON_GRALLOC_DIR) \
$(TOP)/system/media/camera/include \
system/core/include/utils \
system/core/libion/include/ \
@@ -194,3 +191,4 @@ include $(LOCAL_PATH)/v3/Android.mk
endif
include $(CLEAR_VARS)
+endif
diff --git a/v3/Android.mk b/v3/Android.mk
index 47680f2..3a7fdd3 100644
--- a/v3/Android.mk
+++ b/v3/Android.mk
@@ -66,13 +66,15 @@ LOCAL_SHARED_LIBRARIES += \
LOCAL_STATIC_LIBRARIES := \
libyuv_static \
+MESON_GRALLOC_DIR ?= hardware/amlogic/gralloc
+
LOCAL_C_INCLUDES += external/jpeg \
external/jhead/ \
frameworks/native/include/media/hardware \
external/libyuv/files/include/ \
$(TOP)/system/core/libion/include \
$(TOP)/system/core/libion/kernel-headers \
- $(TOP)/hardware/amlogic/gralloc \
+ $(TOP)/$(MESON_GRALLOC_DIR) \
$(LOCAL_PATH)/inc \
$(call include-path-for, camera) \
$(TOP)/external/expat/lib \