1 LOCAL_PATH:= $(call my-dir) 2 3 # 4 # Set USE_CAMERA_STUB for non-emulator and non-simulator builds, if you want 5 # the camera service to use the fake camera. For emulator or simulator builds, 6 # we always use the fake camera. 7 8 ifeq ($(USE_CAMERA_STUB),) 9 USE_CAMERA_STUB:=false 10 ifneq ($(filter sooner generic sim,$(TARGET_DEVICE)),) 11 USE_CAMERA_STUB:=true 12 endif #libcamerastub 13 endif 14 15 ifeq ($(USE_CAMERA_STUB),true) 16 # 17 # libcamerastub 18 # 19 20 include $(CLEAR_VARS) 21 22 LOCAL_SRC_FILES:= \ 23 CameraHardwareStub.cpp \ 24 FakeCamera.cpp 25 26 LOCAL_MODULE:= libcamerastub 27 28 ifeq ($(TARGET_SIMULATOR),true) 29 LOCAL_CFLAGS += -DSINGLE_PROCESS 30 endif 31 32 LOCAL_SHARED_LIBRARIES:= libui 33 34 include $(BUILD_STATIC_LIBRARY) 35 endif # USE_CAMERA_STUB 36 37 # 38 # libcameraservice 39 # 40 41 include $(CLEAR_VARS) 42 43 LOCAL_SRC_FILES:= \ 44 CameraService.cpp 45 46 LOCAL_SHARED_LIBRARIES:= \ 47 libui \ 48 libutils \ 49 libbinder \ 50 libcutils \ 51 libmedia \ 52 libcamera_client \ 53 libsurfaceflinger_client 54 55 LOCAL_MODULE:= libcameraservice 56 57 LOCAL_CFLAGS += -DLOG_TAG=\"CameraService\" 58 59 ifeq ($(TARGET_SIMULATOR),true) 60 LOCAL_CFLAGS += -DSINGLE_PROCESS 61 endif 62 63 ifeq ($(USE_CAMERA_STUB), true) 64 LOCAL_STATIC_LIBRARIES += libcamerastub 65 LOCAL_CFLAGS += -include CameraHardwareStub.h 66 else 67 LOCAL_SHARED_LIBRARIES += libcamera 68 endif 69 70 include $(BUILD_SHARED_LIBRARY) 71 72