1ifneq (,$(filter $(TARGET_ARCH), arm arm64))
2
3LOCAL_PATH:= $(call my-dir)
4
5include $(CLEAR_VARS)
6
7# Too many clang warnings/errors, see b/23163853.
8LOCAL_CLANG := false
9
10LOCAL_SRC_FILES := \
11        util/QCameraCmdThread.cpp \
12        util/QCameraQueue.cpp \
13        util/QCameraFlash.cpp \
14        util/QCameraPerf.cpp \
15        QCamera2Hal.cpp \
16        QCamera2Factory.cpp
17
18#HAL 3.0 source
19LOCAL_SRC_FILES += \
20        HAL3/QCamera3HWI.cpp \
21        HAL3/QCamera3Mem.cpp \
22        HAL3/QCamera3Stream.cpp \
23        HAL3/QCamera3Channel.cpp \
24        HAL3/QCamera3VendorTags.cpp \
25        HAL3/QCamera3PostProc.cpp \
26        HAL3/QCamera3CropRegionMapper.cpp \
27        HAL3/QCamera3StreamMem.cpp
28
29#HAL 1.0 source
30LOCAL_SRC_FILES += \
31        HAL/QCamera2HWI.cpp \
32        HAL/QCameraMem.cpp \
33        HAL/QCameraStateMachine.cpp \
34        HAL/QCameraChannel.cpp \
35        HAL/QCameraStream.cpp \
36        HAL/QCameraPostProc.cpp \
37        HAL/QCamera2HWICallbacks.cpp \
38        HAL/QCameraParameters.cpp \
39        HAL/QCameraThermalAdapter.cpp
40
41LOCAL_CFLAGS := -Wall -Wextra -Werror
42LOCAL_CFLAGS += -DHAS_MULTIMEDIA_HINTS
43LOCAL_CFLAGS += -DENABLE_MODEL_INFO_EXIF
44
45ifeq ($(TARGET_USES_AOSP),true)
46LOCAL_CFLAGS += -DVANILLA_HAL
47endif
48
49#HAL 1.0 Flags
50LOCAL_CFLAGS += -DDEFAULT_DENOISE_MODE_ON -DHAL3
51
52LOCAL_C_INCLUDES := \
53        $(LOCAL_PATH)/stack/common \
54        frameworks/native/include/media/hardware \
55        frameworks/native/include/media/openmax \
56        hardware/qcom/media/msm8974/libstagefrighthw \
57        system/media/camera/include \
58        $(LOCAL_PATH)/../mm-image-codec/qexif \
59        $(LOCAL_PATH)/../mm-image-codec/qomx_core \
60        $(LOCAL_PATH)/util \
61
62#HAL 1.0 Include paths
63LOCAL_C_INCLUDES += \
64        frameworks/native/include/media/hardware \
65        device/lge/bullhead/camera/QCamera2/HAL
66
67LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
68
69#LOCAL_STATIC_LIBRARIES := libqcamera2_util
70LOCAL_C_INCLUDES += \
71        $(TARGET_OUT_HEADERS)/qcom/display
72
73ifeq ($(call is-board-platform-in-list, msm8992),true)
74LOCAL_CFLAGS += -DOPTIMIZE_BUF_COUNT
75endif
76
77LOCAL_SHARED_LIBRARIES := libcamera_client liblog libhardware libutils libcutils libdl libsync
78LOCAL_SHARED_LIBRARIES += libmmcamera_interface libmmjpeg_interface libui libcamera_metadata
79LOCAL_SHARED_LIBRARIES += libqdMetaData
80
81LOCAL_MODULE_RELATIVE_PATH := hw
82LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
83LOCAL_MODULE_TAGS := optional
84
85LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY)
86include $(BUILD_SHARED_LIBRARY)
87
88include $(call first-makefiles-under,$(LOCAL_PATH))
89
90endif
91