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 8# b/24171136 many files not compiling with clang/llvm yet 9LOCAL_CLANG := false 10 11LOCAL_CFLAGS:= \ 12 -DAMSS_VERSION=$(AMSS_VERSION) \ 13 $(mmcamera_debug_defines) \ 14 $(mmcamera_debug_cflags) \ 15 $(USE_SERVER_TREE) 16 17ifeq ($(strip $(TARGET_USES_ION)),true) 18LOCAL_CFLAGS += -DUSE_ION 19endif 20 21LOCAL_CFLAGS += -D_ANDROID_ 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-image-codec/qexif \ 42 $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 43 44LOCAL_C_INCLUDES+= $(kernel_includes) 45LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 46 47LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 48ifeq ($(TARGET_BOARD_PLATFORM),msm8974) 49 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 50 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 51 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 52 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 53 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 54else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 55 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 56 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 57 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 58 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 59 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 60else ifeq ($(TARGET_BOARD_PLATFORM),msm8994) 61 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 62 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 63 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 64 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 65 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 66else ifeq ($(TARGET_BOARD_PLATFORM),msm8916) 67 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 68 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 69 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 70 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 71 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 72else ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 73 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 74 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 75 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 76 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 77 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 78else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 79 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP 80 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 81 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 82 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 83 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 84else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 85 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 86 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 87 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 88 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 89 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 90else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 91 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 92 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP # Don't Care 93 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 94 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 95 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 96else 97 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 98 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care 99 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 100 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 101 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 102endif 103LOCAL_CFLAGS += -Wall -Wextra -Werror 104 105LOCAL_SHARED_LIBRARIES:= \ 106 libcutils libdl libmmcamera_interface 107 108LOCAL_MODULE_TAGS := optional 109 110LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 111 112LOCAL_MODULE:= mm-qcamera-app 113 114include $(BUILD_EXECUTABLE) 115 116# Build tuning library 117include $(CLEAR_VARS) 118 119# b/24171136 many files not compiling with clang/llvm yet 120LOCAL_CLANG := false 121 122LOCAL_CFLAGS:= \ 123 -DAMSS_VERSION=$(AMSS_VERSION) \ 124 $(mmcamera_debug_defines) \ 125 $(mmcamera_debug_cflags) \ 126 $(USE_SERVER_TREE) 127 128ifeq ($(strip $(TARGET_USES_ION)),true) 129LOCAL_CFLAGS += -DUSE_ION 130endif 131 132LOCAL_CFLAGS += -D_ANDROID_ 133 134LOCAL_SRC_FILES:= \ 135 src/mm_qcamera_main_menu.c \ 136 src/mm_qcamera_app.c \ 137 src/mm_qcamera_unit_test.c \ 138 src/mm_qcamera_video.c \ 139 src/mm_qcamera_preview.c \ 140 src/mm_qcamera_snapshot.c \ 141 src/mm_qcamera_rdi.c \ 142 src/mm_qcamera_reprocess.c\ 143 src/mm_qcamera_queue.c \ 144 src/mm_qcamera_socket.c \ 145 src/mm_qcamera_commands.c 146# src/mm_qcamera_dual_test.c \ 147 148LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 149LOCAL_C_INCLUDES+= \ 150 frameworks/native/include/media/openmax \ 151 $(LOCAL_PATH)/../common \ 152 $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 153 $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 154 155LOCAL_C_INCLUDES+= $(kernel_includes) 156LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 157 158LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 159ifeq ($(TARGET_BOARD_PLATFORM),msm8974) 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 165else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 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 171else ifeq ($(TARGET_BOARD_PLATFORM),msm8994) 172 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_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 177else ifeq ($(TARGET_BOARD_PLATFORM),msm8916) 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 183else ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 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 189else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 190 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_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=9 195else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 196 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 197 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 198 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 199 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 200 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 201else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 202 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 203 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP # Don't Care 204 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 205 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 206 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 207else 208 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 209 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care 210 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 211 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 212 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 213endif 214LOCAL_CFLAGS += -Wall -Wextra -Werror 215 216LOCAL_SHARED_LIBRARIES:= \ 217 libcutils libdl libmmcamera_interface 218 219LOCAL_MODULE_TAGS := optional 220 221LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 222 223LOCAL_MODULE:= libmm-qcamera 224include $(BUILD_SHARED_LIBRARY) 225