blob: bea434a99d72731c0db4f994558bed4eac31da34 [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 \
38 liblog \
Ari Hausman-Cohen345bd3a2016-06-13 15:33:53 -070039 libnativehelper \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070040 libsync \
41 libutils \
42
43LOCAL_STATIC_LIBRARIES :=
44
45LOCAL_C_INCLUDES += \
46 $(call include-path-for, camera)
47
48LOCAL_SRC_FILES := \
49 Camera.cpp \
50 Stream.cpp \
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070051 StreamFormat.cpp \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070052 V4L2Camera.cpp \
53 V4L2CameraHAL.cpp \
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070054 V4L2Wrapper.cpp \
Ari Hausman-Cohen73442152016-06-08 15:50:49 -070055
56LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden
57
58include $(BUILD_SHARED_LIBRARY)
Ari Hausman-Cohenc17fd092016-07-18 10:13:26 -070059
60endif # USE_CAMERA_V4L2_HAL