• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8LOCAL_CFLAGS:= \
9        -DAMSS_VERSION=$(AMSS_VERSION) \
10        $(mmcamera_debug_defines) \
11        $(mmcamera_debug_cflags) \
12        $(USE_SERVER_TREE)
13
14ifeq ($(strip $(TARGET_USES_ION)),true)
15LOCAL_CFLAGS += -DUSE_ION
16endif
17
18LOCAL_CFLAGS += -D_ANDROID_
19
20LOCAL_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
34LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc
35LOCAL_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
41LOCAL_C_INCLUDES+= $(kernel_includes)
42LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
43
44LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID
45ifeq ($(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
51else 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
57else 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
63else 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
69else 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
75else 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
81else 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
87else 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
93else
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
99endif
100LOCAL_CFLAGS += -Wall -Wextra -Werror
101
102LOCAL_SHARED_LIBRARIES:= \
103         libcutils libdl libmmcamera_interface
104
105LOCAL_MODULE_TAGS := optional
106
107LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
108
109LOCAL_MODULE:= mm-qcamera-app
110
111include $(BUILD_EXECUTABLE)
112
113# Build tuning library
114include $(CLEAR_VARS)
115
116LOCAL_CFLAGS:= \
117        -DAMSS_VERSION=$(AMSS_VERSION) \
118        $(mmcamera_debug_defines) \
119        $(mmcamera_debug_cflags) \
120        $(USE_SERVER_TREE)
121
122ifeq ($(strip $(TARGET_USES_ION)),true)
123LOCAL_CFLAGS += -DUSE_ION
124endif
125
126LOCAL_CFLAGS += -D_ANDROID_
127
128LOCAL_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
142LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc
143LOCAL_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
149LOCAL_C_INCLUDES+= $(kernel_includes)
150LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
151
152LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID
153ifeq ($(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
159else 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
165else 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
171else 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
177else 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
183else 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
189else 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
195else 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
201else
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
207endif
208LOCAL_CFLAGS += -Wall -Wextra -Werror
209
210LOCAL_SHARED_LIBRARIES:= \
211         libcutils libdl libmmcamera_interface
212
213LOCAL_MODULE_TAGS := optional
214
215LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
216
217LOCAL_MODULE:= libmm-qcamera
218include $(BUILD_SHARED_LIBRARY)
219