Ari Hausman-Cohen | 7344215 | 2016-06-08 15:50:49 -0700 | [diff] [blame] | 1 | # |
| 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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
Ari Hausman-Cohen | c17fd09 | 2016-07-18 10:13:26 -0700 | [diff] [blame] | 18 | |
| 19 | # Prevent the HAL from building on devices not specifically |
| 20 | # requesting to use it. |
| 21 | ifeq ($(USE_CAMERA_V4L2_HAL), true) |
| 22 | |
Ari Hausman-Cohen | 7344215 | 2016-06-08 15:50:49 -0700 | [diff] [blame] | 23 | include $(CLEAR_VARS) |
| 24 | |
| 25 | LOCAL_MODULE := camera.v4l2 |
| 26 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 27 | |
| 28 | LOCAL_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 | |
| 33 | LOCAL_SHARED_LIBRARIES := \ |
Ari Hausman-Cohen | 345bd3a | 2016-06-13 15:33:53 -0700 | [diff] [blame] | 34 | libbase \ |
Ari Hausman-Cohen | 7344215 | 2016-06-08 15:50:49 -0700 | [diff] [blame] | 35 | libcamera_client \ |
| 36 | libcamera_metadata \ |
| 37 | libcutils \ |
Ari Hausman-Cohen | 3eece6f | 2016-07-21 11:08:24 -0700 | [diff] [blame] | 38 | libhardware \ |
Ari Hausman-Cohen | 7344215 | 2016-06-08 15:50:49 -0700 | [diff] [blame] | 39 | liblog \ |
Ari Hausman-Cohen | 345bd3a | 2016-06-13 15:33:53 -0700 | [diff] [blame] | 40 | libnativehelper \ |
Ari Hausman-Cohen | 7344215 | 2016-06-08 15:50:49 -0700 | [diff] [blame] | 41 | libsync \ |
| 42 | libutils \ |
| 43 | |
| 44 | LOCAL_STATIC_LIBRARIES := |
| 45 | |
| 46 | LOCAL_C_INCLUDES += \ |
| 47 | $(call include-path-for, camera) |
| 48 | |
| 49 | LOCAL_SRC_FILES := \ |
Ari Hausman-Cohen | 3841a7f | 2016-07-19 17:27:52 -0700 | [diff] [blame^] | 50 | camera.cpp \ |
| 51 | stream.cpp \ |
| 52 | stream_format.cpp \ |
| 53 | v4l2_camera.cpp \ |
| 54 | v4l2_camera_hal.cpp \ |
| 55 | v4l2_gralloc.cpp \ |
| 56 | v4l2_wrapper.cpp \ |
Ari Hausman-Cohen | 7344215 | 2016-06-08 15:50:49 -0700 | [diff] [blame] | 57 | |
| 58 | LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden |
| 59 | |
| 60 | include $(BUILD_SHARED_LIBRARY) |
Ari Hausman-Cohen | c17fd09 | 2016-07-18 10:13:26 -0700 | [diff] [blame] | 61 | |
| 62 | endif # USE_CAMERA_V4L2_HAL |