blob: ad02c2087fdf3aff678df1c0e46f89d79794de85 [file] [log] [blame]
Ari Hausman-Cohen73442152016-06-08 15:50:49 -07001#
2# Copyright 2016 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH := $(call my-dir)
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070018
19# Prevent the HAL from building on devices not specifically
20# requesting to use it.
21ifeq ($(USE_CAMERA_V4L2_HAL), true)
22
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070023include $(CLEAR_VARS)
24
25LOCAL_MODULE := camera.v4l2
26LOCAL_MODULE_RELATIVE_PATH := hw
27
28LOCAL_CFLAGS += -fno-short-enums
29
30# Note: see V4L2 HALv1 implementation when adding YUV support,
31# some various unexpected variables had to be set.
32
33LOCAL_SHARED_LIBRARIES := \
Ari Hausman-Cohen345bd3a2016-06-13 15:33:53 -070034 libbase \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070035 libcamera_client \
36 libcamera_metadata \
37 libcutils \
Ari Hausman-Cohen3eece6f2016-07-21 11:08:24 -070038 libhardware \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070039 liblog \
Ari Hausman-Cohen345bd3a2016-06-13 15:33:53 -070040 libnativehelper \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070041 libsync \
42 libutils \
43
44LOCAL_STATIC_LIBRARIES :=
45
46LOCAL_C_INCLUDES += \
47 $(call include-path-for, camera)
48
49LOCAL_SRC_FILES := \
50 Camera.cpp \
51 Stream.cpp \
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070052 StreamFormat.cpp \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070053 V4L2Camera.cpp \
54 V4L2CameraHAL.cpp \
Ari Hausman-Cohen3eece6f2016-07-21 11:08:24 -070055 V4L2Gralloc.cpp \
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070056 V4L2Wrapper.cpp \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070057
58LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden
59
60include $(BUILD_SHARED_LIBRARY)
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070061
62endif # USE_CAMERA_V4L2_HAL