1# Copyright (C) 2011 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15ifneq ($(filter generic_x86 generic_x86_64 generic generic_arm64 generic_x86_arm, $(TARGET_DEVICE)),) 16 17LOCAL_PATH := $(call my-dir) 18 19include $(CLEAR_VARS) 20 21# Emulator camera module######################################################## 22 23emulator_camera_module_relative_path := hw 24emulator_camera_cflags := -fno-short-enums -DQEMU_HARDWARE 25emulator_camera_cflags += -Wno-unused-parameter -Wno-missing-field-initializers 26emulator_camera_clang_flags := -Wno-c++11-narrowing 27emulator_camera_shared_libraries := \ 28 libbinder \ 29 libexif \ 30 liblog \ 31 libutils \ 32 libcutils \ 33 libEGL \ 34 libGLESv1_CM \ 35 libGLESv2 \ 36 libui \ 37 libdl \ 38 libjpeg \ 39 libcamera_metadata \ 40 libhardware 41 42emulator_camera_static_libraries := \ 43 android.hardware.camera.common@1.0-helper \ 44 libyuv_static 45 46emulator_camera_c_includes := external/libjpeg-turbo \ 47 external/libexif \ 48 external/libyuv/files/include \ 49 frameworks/native/include/media/hardware \ 50 $(LOCAL_PATH)/../include \ 51 $(LOCAL_PATH)/../../goldfish-opengl/system/OpenglSystemCommon \ 52 $(LOCAL_PATH)/../../goldfish-opengl/shared/OpenglCodecCommon \ 53 $(call include-path-for, camera) 54 55emulator_camera_src := \ 56 EmulatedCameraHal.cpp \ 57 EmulatedCameraFactory.cpp \ 58 EmulatedCameraHotplugThread.cpp \ 59 EmulatedBaseCamera.cpp \ 60 EmulatedCamera.cpp \ 61 EmulatedCameraDevice.cpp \ 62 EmulatedQemuCamera.cpp \ 63 EmulatedQemuCameraDevice.cpp \ 64 EmulatedFakeCamera.cpp \ 65 EmulatedFakeCameraDevice.cpp \ 66 EmulatedFakeRotatingCameraDevice.cpp \ 67 Converters.cpp \ 68 PreviewWindow.cpp \ 69 CallbackNotifier.cpp \ 70 QemuClient.cpp \ 71 JpegCompressor.cpp \ 72 EmulatedCamera2.cpp \ 73 EmulatedFakeCamera2.cpp \ 74 EmulatedQemuCamera2.cpp \ 75 fake-pipeline2/Scene.cpp \ 76 fake-pipeline2/Sensor.cpp \ 77 fake-pipeline2/JpegCompressor.cpp \ 78 EmulatedCamera3.cpp \ 79 EmulatedFakeCamera3.cpp \ 80 EmulatedQemuCamera3.cpp \ 81 qemu-pipeline3/QemuSensor.cpp \ 82 Exif.cpp \ 83 Thumbnail.cpp \ 84 WorkerThread.cpp \ 85 86 87# Emulated camera - goldfish / vbox_x86 build################################### 88 89LOCAL_VENDOR_MODULE := true 90LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 91LOCAL_CFLAGS := ${emulator_camera_cflags} 92LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 93 94LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 95LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries} 96LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 97LOCAL_SRC_FILES := ${emulator_camera_src} 98 99ifeq ($(TARGET_BOARD_PLATFORM),brilloemulator) 100LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM) 101else ifeq ($(TARGET_PRODUCT),vbox_x86) 102LOCAL_MODULE := camera.vbox_x86 103else 104LOCAL_MODULE := camera.goldfish 105endif 106 107include $(BUILD_SHARED_LIBRARY) 108 109# Emulator camera - ranchu build################################################ 110 111include ${CLEAR_VARS} 112 113LOCAL_VENDOR_MODULE := true 114LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 115LOCAL_CFLAGS := ${emulator_camera_cflags} 116LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 117 118LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 119LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries} 120LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 121LOCAL_SRC_FILES := ${emulator_camera_src} 122 123LOCAL_MODULE := camera.ranchu 124 125include $(BUILD_SHARED_LIBRARY) 126 127# Build all subdirectories ##################################################### 128include $(call all-makefiles-under,$(LOCAL_PATH)) 129 130endif 131