Home | History | Annotate | Download | only in mm-camera-test
      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 # b/24171136 many files not compiling with clang/llvm yet
      9 LOCAL_CLANG := false
     10 
     11 LOCAL_CFLAGS:= \
     12         -DAMSS_VERSION=$(AMSS_VERSION) \
     13         $(mmcamera_debug_defines) \
     14         $(mmcamera_debug_cflags) \
     15         $(USE_SERVER_TREE)
     16 
     17 ifeq ($(strip $(TARGET_USES_ION)),true)
     18 LOCAL_CFLAGS += -DUSE_ION
     19 endif
     20 
     21 LOCAL_CFLAGS += -D_ANDROID_
     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-image-codec/qexif \
     42         $(LOCAL_PATH)/../../../mm-image-codec/qomx_core
     43 
     44 LOCAL_C_INCLUDES+= $(kernel_includes)
     45 LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
     46 
     47 LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID
     48 ifeq ($(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
     54 else 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
     60 else 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
     66 else 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
     72 else 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
     78 else 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
     84 else 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
     90 else 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
     96 else
     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
    102 endif
    103 LOCAL_CFLAGS += -Wall -Wextra -Werror
    104 
    105 LOCAL_SHARED_LIBRARIES:= \
    106          libcutils libdl libmmcamera_interface
    107 
    108 LOCAL_MODULE_TAGS := optional
    109 
    110 LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
    111 
    112 LOCAL_MODULE:= mm-qcamera-app
    113 
    114 include $(BUILD_EXECUTABLE)
    115 
    116 # Build tuning library
    117 include $(CLEAR_VARS)
    118 
    119 # b/24171136 many files not compiling with clang/llvm yet
    120 LOCAL_CLANG := false
    121 
    122 LOCAL_CFLAGS:= \
    123         -DAMSS_VERSION=$(AMSS_VERSION) \
    124         $(mmcamera_debug_defines) \
    125         $(mmcamera_debug_cflags) \
    126         $(USE_SERVER_TREE)
    127 
    128 ifeq ($(strip $(TARGET_USES_ION)),true)
    129 LOCAL_CFLAGS += -DUSE_ION
    130 endif
    131 
    132 LOCAL_CFLAGS += -D_ANDROID_
    133 
    134 LOCAL_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 
    148 LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc
    149 LOCAL_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 
    155 LOCAL_C_INCLUDES+= $(kernel_includes)
    156 LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
    157 
    158 LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID
    159 ifeq ($(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
    165 else 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
    171 else 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
    177 else 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
    183 else 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
    189 else 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
    195 else 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
    201 else 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
    207 else
    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
    213 endif
    214 LOCAL_CFLAGS += -Wall -Wextra -Werror
    215 
    216 LOCAL_SHARED_LIBRARIES:= \
    217          libcutils libdl libmmcamera_interface
    218 
    219 LOCAL_MODULE_TAGS := optional
    220 
    221 LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
    222 
    223 LOCAL_MODULE:= libmm-qcamera
    224 include $(BUILD_SHARED_LIBRARY)
    225