1OLD_LOCAL_PATH := $(LOCAL_PATH)
2LOCAL_PATH:=$(call my-dir)
3include $(CLEAR_VARS)
4
5LOCAL_CFLAGS:= \
6        -DAMSS_VERSION=$(AMSS_VERSION) \
7        $(mmcamera_debug_defines) \
8        $(mmcamera_debug_cflags) \
9        $(USE_SERVER_TREE)
10
11ifeq ($(strip $(TARGET_USES_ION)),true)
12LOCAL_CFLAGS += -DUSE_ION
13endif
14
15LOCAL_CFLAGS += -D_ANDROID_
16
17LOCAL_SRC_FILES:= \
18        src/mm_qcamera_app.c \
19        src/mm_qcamera_unit_test.c \
20        src/mm_qcamera_video.c \
21        src/mm_qcamera_preview.c \
22        src/mm_qcamera_snapshot.c \
23        src/mm_qcamera_rdi.c
24#        src/mm_qcamera_dual_test.c \
25
26LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc
27LOCAL_C_INCLUDES+= \
28        frameworks/native/include/media/openmax \
29        $(LOCAL_PATH)/../common \
30        $(LOCAL_PATH)/../../../mm-image-codec/qexif \
31        $(LOCAL_PATH)/../../../mm-image-codec/qomx_core
32
33LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CP_MM_HEAP_ID
34ifeq ($(call is-board-platform,msm8974),true)
35        LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
36        LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
37        LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
38        LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
39        LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9
40else ifeq ($(call is-board-platform,msm8226),true)
41        LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP
42        LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
43        LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
44        LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
45        LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9
46else ifeq ($(call is-board-platform,msm8960),true)
47        LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
48        LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
49        LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
50        LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
51        LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5
52else ifeq ($(call is-chipset-prefix-in-board-platform,msm8660),true)
53        LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP
54        LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP # Don't Care
55        LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI
56        LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
57        LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5
58else
59        LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP
60        LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care
61        LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached
62        LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID
63        LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5
64endif
65LOCAL_CFLAGS += -Wall -Werror
66
67LOCAL_SHARED_LIBRARIES:= \
68         libcutils liblog libdl
69
70LOCAL_MODULE:= mm-qcamera-app
71
72LOCAL_MODULE_TAGS := optional
73
74include $(BUILD_EXECUTABLE)
75
76LOCAL_PATH := $(OLD_LOCAL_PATH)
77