Home | History | Annotate | Download | only in camera
      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 
     16 LOCAL_PATH := $(call my-dir)
     17 
     18 include $(CLEAR_VARS)
     19 
     20 # Emulator camera module########################################################
     21 
     22 emulator_camera_module_relative_path := hw
     23 emulator_camera_cflags := -fno-short-enums -DQEMU_HARDWARE
     24 emulator_camera_cflags += -Wno-unused-parameter -Wno-missing-field-initializers
     25 emulator_camera_clang_flags := -Wno-c++11-narrowing
     26 emulator_camera_shared_libraries := \
     27     libbinder \
     28     libexif \
     29     liblog \
     30     libutils \
     31     libcutils \
     32     libcamera_client \
     33     libui \
     34     libdl \
     35 	libjpeg \
     36 	libcamera_metadata
     37 
     38 emulator_camera_static_libraries := \
     39 	libyuv_static
     40 
     41 emulator_camera_c_includes := external/libjpeg-turbo \
     42 	external/libexif \
     43 	external/libyuv/files/include \
     44 	frameworks/native/include/media/hardware \
     45 	$(LOCAL_PATH)/../include \
     46 	$(LOCAL_PATH)/../../goldfish-opengl/system/OpenglSystemCommon \
     47 	$(call include-path-for, camera)
     48 
     49 emulator_camera_src := \
     50 	EmulatedCameraHal.cpp \
     51 	EmulatedCameraFactory.cpp \
     52 	EmulatedCameraHotplugThread.cpp \
     53 	EmulatedBaseCamera.cpp \
     54 	EmulatedCamera.cpp \
     55 		EmulatedCameraDevice.cpp \
     56 		EmulatedQemuCamera.cpp \
     57 		EmulatedQemuCameraDevice.cpp \
     58 		EmulatedFakeCamera.cpp \
     59 		EmulatedFakeCameraDevice.cpp \
     60 		Converters.cpp \
     61 		PreviewWindow.cpp \
     62 		CallbackNotifier.cpp \
     63 		QemuClient.cpp \
     64 		JpegCompressor.cpp \
     65 	EmulatedCamera2.cpp \
     66 		EmulatedFakeCamera2.cpp \
     67 		EmulatedQemuCamera2.cpp \
     68 		fake-pipeline2/Scene.cpp \
     69 		fake-pipeline2/Sensor.cpp \
     70 		fake-pipeline2/JpegCompressor.cpp \
     71 	EmulatedCamera3.cpp \
     72 		EmulatedFakeCamera3.cpp \
     73 	Exif.cpp \
     74 	Thumbnail.cpp \
     75 	WorkerThread.cpp \
     76 
     77 
     78 # Emulated camera - goldfish / vbox_x86 build###################################
     79 
     80 LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path}
     81 LOCAL_CFLAGS := ${emulator_camera_cflags}
     82 LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags}
     83 
     84 LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries}
     85 LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries}
     86 LOCAL_C_INCLUDES += ${emulator_camera_c_includes}
     87 LOCAL_SRC_FILES := ${emulator_camera_src}
     88 
     89 ifeq ($(TARGET_BOARD_PLATFORM),brilloemulator)
     90 LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
     91 else ifeq ($(TARGET_PRODUCT),vbox_x86)
     92 LOCAL_MODULE := camera.vbox_x86
     93 else
     94 LOCAL_MODULE := camera.goldfish
     95 endif
     96 
     97 include $(BUILD_SHARED_LIBRARY)
     98 
     99 # Emulator camera - ranchu build################################################
    100 
    101 include ${CLEAR_VARS}
    102 
    103 LOCAL_MODULE_RELATIVE_PATH := ${emulator_camera_module_relative_path}
    104 LOCAL_CFLAGS := ${emulator_camera_cflags}
    105 LOCAL_CLANG_CFLAGS += ${emulator_camera_clang_flags}
    106 
    107 LOCAL_SHARED_LIBRARIES := ${emulator_camera_shared_libraries}
    108 LOCAL_STATIC_LIBRARIES := ${emulator_camera_static_libraries}
    109 LOCAL_C_INCLUDES += ${emulator_camera_c_includes}
    110 LOCAL_SRC_FILES := ${emulator_camera_src}
    111 
    112 LOCAL_MODULE := camera.ranchu
    113 
    114 include $(BUILD_SHARED_LIBRARY)
    115 
    116 # Build all subdirectories #####################################################
    117 include $(call all-makefiles-under,$(LOCAL_PATH))
    118 
    119