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_ -DQCAMERA_REDEFINE_LOG 19 20 # System header file path prefix 21 LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys 22 23 LOCAL_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 37 LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 38 LOCAL_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 45 LOCAL_C_INCLUDES+= $(kernel_includes) 46 LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 47 48 LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 49 ifeq ($(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 53 else 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 57 else 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 61 else 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 65 else 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 69 else 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 73 else 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 77 else 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 81 else 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 85 endif 86 LOCAL_CFLAGS += -Wall -Wextra -Werror 87 88 LOCAL_SHARED_LIBRARIES:= \ 89 libcutils libdl libmmcamera_interface 90 91 LOCAL_MODULE_TAGS := optional 92 93 LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 94 95 LOCAL_MODULE:= mm-qcamera-app 96 97 include $(BUILD_EXECUTABLE) 98 99 # Build tuning library 100 include $(CLEAR_VARS) 101 102 LOCAL_CFLAGS:= \ 103 -DAMSS_VERSION=$(AMSS_VERSION) \ 104 $(mmcamera_debug_defines) \ 105 $(mmcamera_debug_cflags) \ 106 $(USE_SERVER_TREE) 107 108 ifeq ($(strip $(TARGET_USES_ION)),true) 109 LOCAL_CFLAGS += -DUSE_ION 110 endif 111 112 LOCAL_CFLAGS += -D_ANDROID_ -DQCAMERA_REDEFINE_LOG 113 114 # System header file path prefix 115 LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys 116 117 LOCAL_SRC_FILES:= \ 118 src/mm_qcamera_main_menu.c \ 119 src/mm_qcamera_app.c \ 120 src/mm_qcamera_unit_test.c \ 121 src/mm_qcamera_video.c \ 122 src/mm_qcamera_preview.c \ 123 src/mm_qcamera_snapshot.c \ 124 src/mm_qcamera_rdi.c \ 125 src/mm_qcamera_reprocess.c\ 126 src/mm_qcamera_queue.c \ 127 src/mm_qcamera_socket.c \ 128 src/mm_qcamera_commands.c 129 # src/mm_qcamera_dual_test.c \ 130 131 LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 132 LOCAL_C_INCLUDES+= \ 133 frameworks/native/include/media/openmax \ 134 $(LOCAL_PATH)/../common \ 135 $(LOCAL_PATH)/../mm-camera-interface/inc \ 136 $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 137 $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 138 139 LOCAL_C_INCLUDES+= $(kernel_includes) 140 LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 141 142 LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 143 ifeq ($(TARGET_BOARD_PLATFORM),msm8974) 144 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 145 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 146 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 147 else ifeq ($(filter $(TARGET_BOARD_PLATFORM), apq8084 msm8084),$(TARGET_BOARD_PLATFORM)) 148 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 149 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 150 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 151 else ifeq ($(TARGET_BOARD_PLATFORM),msm8994) 152 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 153 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 154 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 155 else ifeq ($(TARGET_BOARD_PLATFORM),msm8916 msm8952 msm8937 msm8953) 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 ($(TARGET_BOARD_PLATFORM),msm8226) 160 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 161 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 162 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9 163 else ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 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 167 else ifeq ($(TARGET_BOARD_PLATFORM),msm8960) 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=5 171 else ifneq (,$(filter msm8660,$(TARGET_BOARD_PLATFORM))) 172 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI 173 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 174 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 175 else 176 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 177 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 178 LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5 179 endif 180 LOCAL_CFLAGS += -Wall -Wextra -Werror 181 182 LOCAL_SHARED_LIBRARIES:= \ 183 libcutils libdl libmmcamera_interface 184 185 LOCAL_MODULE_TAGS := optional 186 187 LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 188 189 LOCAL_MODULE:= libmm-qcamera 190 191 include $(BUILD_SHARED_LIBRARY) 192 193 LOCAL_PATH := $(OLD_LOCAL_PATH) 194