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