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_ 19 20# mm_qcamera_main_menu.c has implicit conversion from enum to enum. 21LOCAL_CLANG_CFLAGS += \ 22 -Wno-error=enum-conversion \ 23 24LOCAL_SRC_FILES:= \ 25 src/mm_qcamera_main_menu.c \ 26 src/mm_qcamera_app.c \ 27 src/mm_qcamera_unit_test.c \ 28 src/mm_qcamera_video.c \ 29 src/mm_qcamera_preview.c \ 30 src/mm_qcamera_snapshot.c \ 31 src/mm_qcamera_rdi.c \ 32 src/mm_qcamera_reprocess.c\ 33 src/mm_qcamera_queue.c \ 34 src/mm_qcamera_socket.c \ 35 src/mm_qcamera_commands.c 36# src/mm_qcamera_dual_test.c \ 37 38LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 39LOCAL_C_INCLUDES+= \ 40 frameworks/native/include/media/openmax \ 41 $(LOCAL_PATH)/../common \ 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_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 51 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 52 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 53 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 54 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 55else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 56 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 57 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 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),msm8994) 62 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 63 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 64 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 65 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 66 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 67else ifeq ($(TARGET_BOARD_PLATFORM),msm8916) 68 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 69 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 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),msm8226) 74 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 75 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 76 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 77 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 78 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 79else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 80 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 81 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 82 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 83 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 84 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 85else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 86 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 87 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 88 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 89 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 90 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 91else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 92 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 93 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP # Don't Care 94 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 95 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 96 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 97else 98 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 99 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care 100 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 101 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 102 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 103endif 104LOCAL_CFLAGS += -Wall -Werror 105 106LOCAL_SHARED_LIBRARIES:= \ 107 libcutils libdl libmmcamera_interface 108 109LOCAL_MODULE_TAGS := optional 110 111LOCAL_32_BIT_ONLY := true 112 113LOCAL_MODULE:= mm-qcamera-app 114 115include $(BUILD_EXECUTABLE) 116 117# Build tuning library 118include $(CLEAR_VARS) 119 120LOCAL_CFLAGS:= \ 121 -DAMSS_VERSION=$(AMSS_VERSION) \ 122 $(mmcamera_debug_defines) \ 123 $(mmcamera_debug_cflags) \ 124 $(USE_SERVER_TREE) 125 126ifeq ($(strip $(TARGET_USES_ION)),true) 127LOCAL_CFLAGS += -DUSE_ION 128endif 129 130LOCAL_CFLAGS += -D_ANDROID_ 131 132# mm_qcamera_main_menu.c has implicit conversion from enum to enum. 133LOCAL_CLANG_CFLAGS += \ 134 -Wno-error=enum-conversion \ 135 136LOCAL_SRC_FILES:= \ 137 src/mm_qcamera_main_menu.c \ 138 src/mm_qcamera_app.c \ 139 src/mm_qcamera_unit_test.c \ 140 src/mm_qcamera_video.c \ 141 src/mm_qcamera_preview.c \ 142 src/mm_qcamera_snapshot.c \ 143 src/mm_qcamera_rdi.c \ 144 src/mm_qcamera_reprocess.c\ 145 src/mm_qcamera_queue.c \ 146 src/mm_qcamera_socket.c \ 147 src/mm_qcamera_commands.c 148# src/mm_qcamera_dual_test.c \ 149 150LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 151LOCAL_C_INCLUDES+= \ 152 frameworks/native/include/media/openmax \ 153 $(LOCAL_PATH)/../common \ 154 $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 155 $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 156 157LOCAL_C_INCLUDES+= $(kernel_includes) 158LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 159 160LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 161ifeq ($(TARGET_BOARD_PLATFORM),msm8974) 162 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 163 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 164 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 165 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 166 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 167else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 168 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 169 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 170 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 171 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 172 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 173else ifeq ($(TARGET_BOARD_PLATFORM),msm8994) 174 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 175 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 176 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 177 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 178 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 179else ifeq ($(TARGET_BOARD_PLATFORM),msm8916) 180 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 181 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 182 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 183 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 184 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 185else ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 186 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 187 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 188 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 189 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 190 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 191else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 192 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 193 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 194 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 195 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 196 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 197else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 198 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 199 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 200 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 201 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 202 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 203else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 204 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 205 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP # Don't Care 206 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 207 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 208 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 209else 210 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 211 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care 212 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 213 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 214 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 215endif 216LOCAL_CFLAGS += -Wall -Werror 217 218LOCAL_SHARED_LIBRARIES:= \ 219 libcutils libdl libmmcamera_interface 220 221LOCAL_MODULE_TAGS := optional 222 223LOCAL_32_BIT_ONLY := true 224 225LOCAL_MODULE:= libmm-qcamera 226include $(BUILD_SHARED_LIBRARY) 227