1OLD_LOCAL_PATH := $(LOCAL_PATH) 2LOCAL_PATH:=$(call my-dir) 3 4# Build command line test app: mm-qcamera-app 5include $(LOCAL_PATH)/../../../common.mk 6include $(CLEAR_VARS) 7 8LOCAL_CFLAGS:= \ 9 -DAMSS_VERSION=$(AMSS_VERSION) \ 10 $(mmcamera_debug_defines) \ 11 $(mmcamera_debug_cflags) \ 12 $(USE_SERVER_TREE) 13 14ifeq ($(strip $(TARGET_USES_ION)),true) 15LOCAL_CFLAGS += -DUSE_ION 16endif 17 18LOCAL_CFLAGS += -D_ANDROID_ -DQCAMERA_REDEFINE_LOG 19 20# System header file path prefix 21LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys 22 23LOCAL_SRC_FILES:= \ 24 src/mm_qcamera_main_menu.c \ 25 src/mm_qcamera_app.c \ 26 src/mm_qcamera_unit_test.c \ 27 src/mm_qcamera_video.c \ 28 src/mm_qcamera_preview.c \ 29 src/mm_qcamera_snapshot.c \ 30 src/mm_qcamera_rdi.c \ 31 src/mm_qcamera_reprocess.c\ 32 src/mm_qcamera_queue.c \ 33 src/mm_qcamera_socket.c \ 34 src/mm_qcamera_commands.c 35# src/mm_qcamera_dual_test.c \ 36 37LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 38LOCAL_C_INCLUDES+= \ 39 frameworks/native/include/media/openmax \ 40 $(LOCAL_PATH)/../common \ 41 $(LOCAL_PATH)/../mm-camera-interface/inc \ 42 $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 43 $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 44 45LOCAL_C_INCLUDES+= $(kernel_includes) 46LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 47 48LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 49ifeq ($(TARGET_BOARD_PLATFORM),msm8974) 50 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 51 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 52 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 53else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 54 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 55 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 56 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 57else ifeq ($(TARGET_BOARD_PLATFORM),msm8994) 58 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 59 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 60 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 61else ifeq ($(TARGET_BOARD_PLATFORM),msm8916 msm8952 msm8937 msm8953) 62 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 63 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 64 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 65else ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 66 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 67 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 68 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 69else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 70 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 71 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 72 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 73else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 74 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 75 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 76 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 77else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 78 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 79 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 80 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 81else 82 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 83 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 84 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 85endif 86LOCAL_CFLAGS += -Wall -Wextra -Werror 87 88LOCAL_SHARED_LIBRARIES:= \ 89 libcutils libdl liblog libmmcamera_interface 90 91LOCAL_MODULE_TAGS := optional 92 93LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 94 95LOCAL_MODULE:= mm-qcamera-app 96LOCAL_LICENSE_KINDS:= SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD 97LOCAL_LICENSE_CONDITIONS:= notice 98LOCAL_PROPRIETARY_MODULE := true 99 100include $(BUILD_EXECUTABLE) 101 102# Build tuning library 103include $(CLEAR_VARS) 104 105LOCAL_CFLAGS:= \ 106 -DAMSS_VERSION=$(AMSS_VERSION) \ 107 $(mmcamera_debug_defines) \ 108 $(mmcamera_debug_cflags) \ 109 $(USE_SERVER_TREE) 110 111ifeq ($(strip $(TARGET_USES_ION)),true) 112LOCAL_CFLAGS += -DUSE_ION 113endif 114 115LOCAL_CFLAGS += -D_ANDROID_ -DQCAMERA_REDEFINE_LOG 116 117# System header file path prefix 118LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys 119 120LOCAL_SRC_FILES:= \ 121 src/mm_qcamera_main_menu.c \ 122 src/mm_qcamera_app.c \ 123 src/mm_qcamera_unit_test.c \ 124 src/mm_qcamera_video.c \ 125 src/mm_qcamera_preview.c \ 126 src/mm_qcamera_snapshot.c \ 127 src/mm_qcamera_rdi.c \ 128 src/mm_qcamera_reprocess.c\ 129 src/mm_qcamera_queue.c \ 130 src/mm_qcamera_socket.c \ 131 src/mm_qcamera_commands.c 132# src/mm_qcamera_dual_test.c \ 133 134LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 135LOCAL_C_INCLUDES+= \ 136 frameworks/native/include/media/openmax \ 137 $(LOCAL_PATH)/../common \ 138 $(LOCAL_PATH)/../mm-camera-interface/inc \ 139 $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 140 $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 141 142LOCAL_C_INCLUDES+= $(kernel_includes) 143LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 144 145LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 146ifeq ($(TARGET_BOARD_PLATFORM),msm8974) 147 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 148 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 149 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 150else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 151 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 152 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 153 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 154else ifeq ($(TARGET_BOARD_PLATFORM),msm8994) 155 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 156 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 157 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 158else ifeq ($(TARGET_BOARD_PLATFORM),msm8916 msm8952 msm8937 msm8953) 159 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 160 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 161 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 162else ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 163 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 164 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 165 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 166else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 167 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 168 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 169 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 170else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 171 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 172 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 173 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 174else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 175 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 176 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 177 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 178else 179 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 180 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 181 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 182endif 183LOCAL_CFLAGS += -Wall -Wextra -Werror 184 185LOCAL_SHARED_LIBRARIES:= \ 186 libcutils libdl liblog libmmcamera_interface 187 188LOCAL_MODULE_TAGS := optional 189 190LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 191 192LOCAL_MODULE:= libmm-qcamera 193LOCAL_LICENSE_KINDS:= SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD 194LOCAL_LICENSE_CONDITIONS:= notice 195LOCAL_PROPRIETARY_MODULE := true 196 197include $(BUILD_SHARED_LIBRARY) 198 199# Build cam_semaphore_tests 200include $(CLEAR_VARS) 201 202LOCAL_SRC_FILES := src/cam_semaphore_tests.cpp 203 204LOCAL_C_INCLUDES += $(LOCAL_PATH)/../common 205 206LOCAL_CFLAGS := -Wall -Wextra -Werror 207 208LOCAL_MODULE := cam_semaphore_tests 209LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD 210LOCAL_LICENSE_CONDITIONS := notice 211LOCAL_MODULE_TAGS := tests 212 213include $(BUILD_NATIVE_TEST) 214 215LOCAL_PATH := $(OLD_LOCAL_PATH) 216