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 15 16LOCAL_PATH := $(call my-dir) 17 18include $(CLEAR_VARS) 19 20# Emulator camera module######################################################## 21 22emulator_camera_module_relative_path := hw 23emulator_camera_cflags := -fno-short-enums -DQEMU_HARDWARE 24emulator_camera_cflags += -Wno-unused-parameter -Wno-missing-field-initializers 25emulator_camera_clang_flags := -Wno-c++11-narrowing 26emulator_camera_shared_libraries := \ 27 libbinder \ 28 liblog \ 29 libutils \ 30 libcutils \ 31 libcamera_client \ 32 libui \ 33 libdl \ 34 libjpeg \ 35 libcamera_metadata 36 37emulator_camera_c_includes := external/jpeg \ 38 frameworks/native/include/media/hardware \ 39 $(LOCAL_PATH)/../opengl/system/OpenglSystemCommon \ 40 $(call include-path-for, camera) 41 42emulator_camera_src := \ 43 EmulatedCameraHal.cpp \ 44 EmulatedCameraFactory.cpp \ 45 EmulatedCameraHotplugThread.cpp \ 46 EmulatedBaseCamera.cpp \ 47 EmulatedCamera.cpp \ 48 EmulatedCameraDevice.cpp \ 49 EmulatedQemuCamera.cpp \ 50 EmulatedQemuCameraDevice.cpp \ 51 EmulatedFakeCamera.cpp \ 52 EmulatedFakeCameraDevice.cpp \ 53 Converters.cpp \ 54 PreviewWindow.cpp \ 55 CallbackNotifier.cpp \ 56 QemuClient.cpp \ 57 JpegCompressor.cpp \ 58 EmulatedCamera2.cpp \ 59 EmulatedFakeCamera2.cpp \ 60 EmulatedQemuCamera2.cpp \ 61 fake-pipeline2/Scene.cpp \ 62 fake-pipeline2/Sensor.cpp \ 63 fake-pipeline2/JpegCompressor.cpp \ 64 EmulatedCamera3.cpp \ 65 EmulatedFakeCamera3.cpp 66 67# Emulated camera - goldfish / vbox_x86 build################################### 68 69LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 70LOCAL_CFLAGS := ${emulator_camera_cflags} 71LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 72 73LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 74LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 75LOCAL_SRC_FILES := ${emulator_camera_src} 76 77ifeq ($(TARGET_PRODUCT),vbox_x86) 78LOCAL_MODULE := camera.vbox_x86 79else 80LOCAL_MODULE := camera.goldfish 81endif 82 83include $(BUILD_SHARED_LIBRARY) 84 85# Emulator camera - ranchu build################################################ 86 87include ${CLEAR_VARS} 88 89LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 90LOCAL_CFLAGS := ${emulator_camera_cflags} 91LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 92 93LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 94LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 95LOCAL_SRC_FILES := ${emulator_camera_src} 96 97LOCAL_MODULE := camera.ranchu 98 99include $(BUILD_SHARED_LIBRARY) 100 101# JPEG stub##################################################################### 102 103ifneq ($(TARGET_BUILD_PDK),true) 104 105include $(CLEAR_VARS) 106 107jpeg_module_relative_path := hw 108jpeg_cflags := -fno-short-enums -DQEMU_HARDWARE 109jpeg_cflags += -Wno-unused-parameter 110jpeg_clang_flags += -Wno-c++11-narrowing 111jpeg_shared_libraries := \ 112 libcutils \ 113 liblog \ 114 libskia \ 115 libandroid_runtime 116jpeg_c_includes := external/libjpeg-turbo \ 117 external/skia/include/core/ \ 118 frameworks/base/core/jni/android/graphics \ 119 frameworks/native/include 120jpeg_src := JpegStub.cpp 121 122# JPEG stub - goldfish build#################################################### 123 124LOCAL_MODULE_RELATIVE_PATH := ${jpeg_module_relative_path} 125LOCAL_CFLAGS += ${jpeg_cflags} 126LOCAL_CLANG_CFLAGS += ${jpeg_clangflags} 127 128LOCAL_SHARED_LIBRARIES := ${jpeg_shared_libraries} 129LOCAL_C_INCLUDES += ${jpeg_c_includes} 130LOCAL_SRC_FILES := ${jpeg_src} 131 132LOCAL_MODULE := camera.goldfish.jpeg 133 134include $(BUILD_SHARED_LIBRARY) 135 136# JPEG stub - ranchu build###################################################### 137 138include ${CLEAR_VARS} 139 140LOCAL_MODULE := camera.ranchu.jpeg 141 142LOCAL_MODULE_RELATIVE_PATH := ${jpeg_module_relative_path} 143LOCAL_CFLAGS += ${jpeg_cflags} 144LOCAL_CLANG_CFLAGS += ${jpeg_clangflags} 145 146LOCAL_SHARED_LIBRARIES := ${jpeg_shared_libraries} 147LOCAL_C_INCLUDES += ${jpeg_c_includes} 148LOCAL_SRC_FILES := ${jpeg_src} 149 150include $(BUILD_SHARED_LIBRARY) 151 152endif # !PDK 153