1OLD_LOCAL_PATH := $(LOCAL_PATH)
2LOCAL_PATH := $(call my-dir)
3
4include $(LOCAL_PATH)/../../../common.mk
5include $(CLEAR_VARS)
6
7# Too many clang warnings/errors, see b/23163853.
8LOCAL_CLANG := false
9
10LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
11LOCAL_CFLAGS+= -D_ANDROID_
12
13LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter
14
15LOCAL_C_INCLUDES+= $(kernel_includes)
16LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
17
18LOCAL_C_INCLUDES += \
19    frameworks/native/include/media/openmax \
20    $(LOCAL_PATH)/inc \
21    $(LOCAL_PATH)/../common \
22    $(LOCAL_PATH)/../../../ \
23    $(LOCAL_PATH)/../../../mm-image-codec/qexif \
24    $(LOCAL_PATH)/../../../mm-image-codec/qomx_core
25
26ifeq ($(strip $(TARGET_USES_ION)),true)
27    LOCAL_CFLAGS += -DUSE_ION
28endif
29
30ifneq (,$(filter  msm8610,$(TARGET_BOARD_PLATFORM)))
31    LOCAL_CFLAGS+= -DLOAD_ADSP_RPC_LIB
32endif
33
34DUAL_JPEG_TARGET_LIST := msm8974
35DUAL_JPEG_TARGET_LIST += msm8994
36
37ifneq (,$(filter  $(DUAL_JPEG_TARGET_LIST),$(TARGET_BOARD_PLATFORM)))
38    LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=2
39else
40    LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=1
41endif
42
43JPEG_PIPELINE_TARGET_LIST := msm8994
44JPEG_PIPELINE_TARGET_LIST += msm8992
45
46ifneq (,$(filter  $(JPEG_PIPELINE_TARGET_LIST),$(TARGET_BOARD_PLATFORM)))
47    LOCAL_CFLAGS+= -DMM_JPEG_USE_PIPELINE
48endif
49
50LOCAL_SRC_FILES := \
51    src/mm_jpeg_queue.c \
52    src/mm_jpeg_exif.c \
53    src/mm_jpeg.c \
54    src/mm_jpeg_interface.c \
55    src/mm_jpeg_ionbuf.c \
56    src/mm_jpegdec_interface.c \
57    src/mm_jpegdec.c
58
59LOCAL_MODULE           := libmmjpeg_interface
60LOCAL_PRELINK_MODULE   := false
61LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libqomx_core
62LOCAL_MODULE_TAGS := optional
63
64LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
65include $(BUILD_SHARED_LIBRARY)
66
67LOCAL_PATH := $(OLD_LOCAL_PATH)
68