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 ifneq ($(filter generic_x86 generic_x86_64 generic generic_arm64 generic_mips generic_mips64, $(TARGET_DEVICE)),) 16 17 LOCAL_PATH := $(call my-dir) 18 19 include $(CLEAR_VARS) 20 21 # Emulator camera module######################################################## 22 23 emulator_camera_module_relative_path := hw 24 emulator_camera_cflags := -fno-short-enums -DQEMU_HARDWARE 25 emulator_camera_cflags += -Wno-unused-parameter -Wno-missing-field-initializers 26 emulator_camera_clang_flags := -Wno-c++11-narrowing 27 emulator_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 42 emulator_camera_static_libraries := \ 43 android.hardware.camera.common (a] 1.0-helper \ 44 libyuv_static 45 46 emulator_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 $(call include-path-for, camera) 53 54 emulator_camera_src := \ 55 EmulatedCameraHal.cpp \ 56 EmulatedCameraFactory.cpp \ 57 EmulatedCameraHotplugThread.cpp \ 58 EmulatedBaseCamera.cpp \ 59 EmulatedCamera.cpp \ 60 EmulatedCameraDevice.cpp \ 61 EmulatedQemuCamera.cpp \ 62 EmulatedQemuCameraDevice.cpp \ 63 EmulatedFakeCamera.cpp \ 64 EmulatedFakeCameraDevice.cpp \ 65 EmulatedFakeRotatingCameraDevice.cpp \ 66 Converters.cpp \ 67 PreviewWindow.cpp \ 68 CallbackNotifier.cpp \ 69 QemuClient.cpp \ 70 JpegCompressor.cpp \ 71 EmulatedCamera2.cpp \ 72 EmulatedFakeCamera2.cpp \ 73 EmulatedQemuCamera2.cpp \ 74 fake-pipeline2/Scene.cpp \ 75 fake-pipeline2/Sensor.cpp \ 76 fake-pipeline2/JpegCompressor.cpp \ 77 EmulatedCamera3.cpp \ 78 EmulatedFakeCamera3.cpp \ 79 EmulatedQemuCamera3.cpp \ 80 qemu-pipeline3/QemuSensor.cpp \ 81 Exif.cpp \ 82 Thumbnail.cpp \ 83 WorkerThread.cpp \ 84 85 86 # Emulated camera - goldfish / vbox_x86 build################################### 87 88 LOCAL_VENDOR_MODULE := true 89 LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 90 LOCAL_CFLAGS := ${emulator_camera_cflags} 91 LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 92 93 LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 94 LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries} 95 LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 96 LOCAL_SRC_FILES := ${emulator_camera_src} 97 98 ifeq ($(TARGET_BOARD_PLATFORM),brilloemulator) 99 LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM) 100 else ifeq ($(TARGET_PRODUCT),vbox_x86) 101 LOCAL_MODULE := camera.vbox_x86 102 else 103 LOCAL_MODULE := camera.goldfish 104 endif 105 106 include $(BUILD_SHARED_LIBRARY) 107 108 # Emulator camera - ranchu build################################################ 109 110 include ${CLEAR_VARS} 111 112 LOCAL_VENDOR_MODULE := true 113 LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 114 LOCAL_CFLAGS := ${emulator_camera_cflags} 115 LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 116 117 LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 118 LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries} 119 LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 120 LOCAL_SRC_FILES := ${emulator_camera_src} 121 122 LOCAL_MODULE := camera.ranchu 123 124 include $(BUILD_SHARED_LIBRARY) 125 126 # Build all subdirectories ##################################################### 127 include $(call all-makefiles-under,$(LOCAL_PATH)) 128 129 endif 130