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_x86_arm, $(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 $(LOCAL_PATH)/../../goldfish-opengl/shared/OpenglCodecCommon \ 53 $(call include-path-for, camera) 54 55 emulator_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 89 LOCAL_VENDOR_MODULE := true 90 LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 91 LOCAL_CFLAGS := ${emulator_camera_cflags} 92 LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 93 94 LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 95 LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries} 96 LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 97 LOCAL_SRC_FILES := ${emulator_camera_src} 98 99 ifeq ($(TARGET_BOARD_PLATFORM),brilloemulator) 100 LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM) 101 else ifeq ($(TARGET_PRODUCT),vbox_x86) 102 LOCAL_MODULE := camera.vbox_x86 103 else 104 LOCAL_MODULE := camera.goldfish 105 endif 106 107 include $(BUILD_SHARED_LIBRARY) 108 109 # Emulator camera - ranchu build################################################ 110 111 include ${CLEAR_VARS} 112 113 LOCAL_VENDOR_MODULE := true 114 LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path} 115 LOCAL_CFLAGS := ${emulator_camera_cflags} 116 LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags} 117 118 LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries} 119 LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries} 120 LOCAL_C_INCLUDES += ${emulator_camera_c_includes} 121 LOCAL_SRC_FILES := ${emulator_camera_src} 122 123 LOCAL_MODULE := camera.ranchu 124 125 include $(BUILD_SHARED_LIBRARY) 126 127 # Build all subdirectories ##################################################### 128 include $(call all-makefiles-under,$(LOCAL_PATH)) 129 130 endif 131