1 2#ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 3OLD_LOCAL_PATH := $(LOCAL_PATH) 4LOCAL_PATH := $(call my-dir) 5 6include $(CLEAR_VARS) 7 8DLOPEN_LIBMMCAMERA:=0 9 10LOCAL_CFLAGS:= -DDLOPEN_LIBMMCAMERA=$(DLOPEN_LIBMMCAMERA) 11 12ifeq ($(strip $(TARGET_USES_ION)),true) 13 LOCAL_CFLAGS += -DUSE_ION 14endif 15 16LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CP_MM_HEAP_ID # 8660=SMI, Rest=EBI 17LOCAL_CFLAGS += -DCAMERA_ZSL_ION_HEAP_ID=ION_CP_MM_HEAP_ID 18 19LOCAL_CFLAGS+= -DHW_ENCODE 20LOCAL_CFLAGS+= -DUSE_NEON_CONVERSION 21 22ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 23 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 24 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 25 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 26 LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 27 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 28else ifeq ($(TARGET_BOARD_PLATFORM),msm8660) 29 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 30 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care 31 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID # EBI 32 LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 33 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 34else 35 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP 36 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP # Don't Care 37 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 38endif 39 40LOCAL_HAL_FILES := \ 41 src/QCameraHAL.cpp \ 42 src/QCameraHWI.cpp \ 43 src/QCameraStream.cpp \ 44 src/QCameraHWI_Metatags.cpp \ 45 src/QCameraStream_Preview.cpp 46 47LOCAL_HAL_WRAPPER_FILES := ../wrapper/QualcommCamera.cpp 48 49LOCAL_C_INCLUDES := \ 50 $(LOCAL_PATH)/../wrapper \ 51 $(LOCAL_PATH)/inc \ 52 $(LOCAL_PATH)/../../stack/mm-camera-interface/inc\ 53 $(LOCAL_PATH)/../../stack/mm-jpeg-interface/inc\ 54 $(TARGET_OUT_INTERMEDIATES)/include/mm-camera-interface_badger \ 55 56LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc \ 57 hardware/qcom/display/libgenlock \ 58 hardware/qcom/media/libstagefrighthw \ 59 system/media/camera/include 60 61# if debug service layer and up , use stub camera! 62LOCAL_C_INCLUDES += \ 63 frameworks/base/services/camera/libcameraservice 64 65LOCAL_SRC_FILES := \ 66 $(LOCAL_HAL_WRAPPER_FILES) \ 67 $(LOCAL_HAL_FILES) 68 69LOCAL_SHARED_LIBRARIES := libutils libui libcamera_client liblog libcutils 70LOCAL_SHARED_LIBRARIES += libmmcamera_interface 71LOCAL_SHARED_LIBRARIES+= libgenlock libbinder libcamera_metadata 72 73LOCAL_CFLAGS += -include bionic/libc/include/sys/socket.h 74 75LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 76LOCAL_MODULE:= camera.$(TARGET_BOARD_PLATFORM) 77LOCAL_MODULE_TAGS := optional 78include $(BUILD_SHARED_LIBRARY) 79 80LOCAL_PATH := $(OLD_LOCAL_PATH) 81 82