blob: ffb0c91d2a952524150bbfef45e0cf5cab0349b2
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 | LOCAL_MODULE_RELATIVE_PATH := hw |
21 | LOCAL_CFLAGS += -fno-short-enums -DQEMU_HARDWARE |
22 | LOCAL_CFLAGS += -Wno-unused-parameter -Wno-missing-field-initializers |
23 | |
24 | ######################################################################################################## |
25 | CAMHAL_GIT_VERSION="$(shell cd $(LOCAL_PATH);git log | grep commit -m 1 | cut -d' ' -f 2)" |
26 | CAMHAL_GIT_UNCOMMIT_FILE_NUM=$(shell cd $(LOCAL_PATH);git diff | grep +++ -c) |
27 | CAMHAL_LAST_CHANGED="$(shell cd $(LOCAL_PATH);git log | grep Date -m 1)" |
28 | CAMHAL_BUILD_TIME=" $(shell date)" |
29 | CAMHAL_BUILD_NAME=" $(shell echo ${LOGNAME})" |
30 | CAMHAL_BRANCH_NAME="$(shell cd $(LOCAL_PATH);git branch -a | sed -n '/'*'/p')" |
31 | CAMHAL_BUILD_MODE=$(shell echo ${TARGET_BUILD_VARIANT}) |
32 | CAMHAL_HOSTNAME="$(shell hostname)" |
33 | CAMHAL_IP="$(shell ifconfig eth0|grep -oE '([0-9]{1,3}\.?){4}'|head -n 1)" |
34 | CAMHAL_PATH="$(shell pwd)/$(LOCAL_PATH)" |
35 | |
36 | LOCAL_CFLAGS+=-DHAVE_VERSION_INFO |
37 | LOCAL_CFLAGS+=-DCAMHAL_GIT_VERSION=\"${CAMHAL_GIT_VERSION}${CAMHAL_GIT_DIRTY}\" |
38 | LOCAL_CFLAGS+=-DCAMHAL_BRANCH_NAME=\"${CAMHAL_BRANCH_NAME}\" |
39 | LOCAL_CFLAGS+=-DCAMHAL_LAST_CHANGED=\"${CAMHAL_LAST_CHANGED}\" |
40 | LOCAL_CFLAGS+=-DCAMHAL_BUILD_TIME=\"${CAMHAL_BUILD_TIME}\" |
41 | LOCAL_CFLAGS+=-DCAMHAL_BUILD_NAME=\"${CAMHAL_BUILD_NAME}\" |
42 | LOCAL_CFLAGS+=-DCAMHAL_GIT_UNCOMMIT_FILE_NUM=${CAMHAL_GIT_UNCOMMIT_FILE_NUM} |
43 | LOCAL_CFLAGS+=-DCAMHAL_HOSTNAME=\"${CAMHAL_HOSTNAME}\" |
44 | LOCAL_CFLAGS+=-DCAMHAL_IP=\"${CAMHAL_IP}\" |
45 | LOCAL_CFLAGS+=-DCAMHAL_PATH=\"${CAMHAL_PATH}\" |
46 | ######################################################################################################## |
47 | |
48 | LOCAL_SHARED_LIBRARIES:= \ |
49 | libbinder \ |
50 | liblog \ |
51 | libutils \ |
52 | libcutils \ |
53 | libcamera_client \ |
54 | libion \ |
55 | libui \ |
56 | libdl \ |
57 | libjpeg \ |
58 | libjhead |
59 | |
60 | # JPEG conversion libraries and includes. |
61 | LOCAL_SHARED_LIBRARIES += \ |
62 | libjpeg \ |
63 | libcamera_metadata |
64 | |
65 | LOCAL_STATIC_LIBRARIES := \ |
66 | libyuv_static \ |
67 | |
68 | LOCAL_C_INCLUDES += external/jpeg \ |
69 | external/jhead/ \ |
70 | frameworks/native/include/media/hardware \ |
71 | external/libyuv/files/include/ \ |
72 | $(LOCAL_PATH)/../opengl/system/OpenglSystemCommon \ |
73 | $(TOP)/system/core/libion/include \ |
74 | $(TOP)/system/core/libion/kernel-headers \ |
75 | $(LOCAL_PATH)/inc \ |
76 | $(LOCAL_PATH)/hardware/amlogic/gralloc \ |
77 | $(call include-path-for, camera) |
78 | |
79 | LOCAL_SRC_FILES := \ |
80 | EmulatedCameraHal.cpp \ |
81 | EmulatedCameraFactory.cpp \ |
82 | EmulatedCameraHotplugThread.cpp \ |
83 | EmulatedBaseCamera.cpp \ |
84 | EmulatedCamera.cpp \ |
85 | EmulatedCameraDevice.cpp \ |
86 | EmulatedQemuCamera.cpp \ |
87 | EmulatedQemuCameraDevice.cpp \ |
88 | EmulatedFakeCamera.cpp \ |
89 | EmulatedFakeCameraDevice.cpp \ |
90 | Converters.cpp \ |
91 | PreviewWindow.cpp \ |
92 | CallbackNotifier.cpp \ |
93 | QemuClient.cpp \ |
94 | JpegCompressor.cpp \ |
95 | fake-pipeline2/Scene.cpp \ |
96 | fake-pipeline2/Sensor.cpp \ |
97 | fake-pipeline2/ge2d_stream.cpp \ |
98 | fake-pipeline2/JpegCompressor.cpp \ |
99 | fake-pipeline2/NV12_resize.c \ |
100 | fake-pipeline2/util.c \ |
101 | EmulatedCamera3.cpp \ |
102 | EmulatedFakeCamera3.cpp \ |
103 | EmulatedFakeCamera3Info.cpp \ |
104 | fake-pipeline2/camera_hw.cpp \ |
105 | VendorTags.cpp \ |
106 | |
107 | ifeq ($(TARGET_PRODUCT),vbox_x86) |
108 | LOCAL_MODULE := camera.vbox_x86 |
109 | else |
110 | LOCAL_MODULE:= camera.amlogic |
111 | endif |
112 | |
113 | include $(BUILD_SHARED_LIBRARY) |
114 | |
115 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
116 | |
117 | $(info ************************************************************) |
118 | |
119 | $(info pdk or not: $(TARGET_BUILD_PDK)) |
120 | $(info target board: $(TARGET_BOARD_PLATFORM)) |
121 | $(info git version: $(CAMHAL_GIT_VERSION)) |
122 | $(info uncomment: $(CAMHAL_GIT_UNCOMMIT_FILE_NUM) files) |
123 | $(info last changed: $(CAMHAL_LAST_CHANGED)) |
124 | $(info build time: $(CAMHAL_BUILD_TIME)) |
125 | $(info builder name: $(CAMHAL_BUILD_NAME)) |
126 | $(info branch name: $(CAMHAL_BRANCH_NAME)) |
127 | $(info build mode: $(CAMHAL_BUILD_MODE)) |
128 | $(info host name: $(CAMHAL_HOSTNAME)) |
129 | $(info host IP: $(CAMHAL_IP)) |
130 | $(info path: $(CAMHAL_PATH)) |
131 | $(info ************************************************************) |
132 | $(shell sleep 1) |
133 | |
134 | ################################################################# |
135 | ifneq (true,true) |
136 | |
137 | include $(CLEAR_VARS) |
138 | |
139 | LOCAL_MODULE_RELATIVE_PATH := hw |
140 | LOCAL_CFLAGS += -fno-short-enums -DQEMU_HARDWARE |
141 | LOCAL_CFLAGS += -Wno-unused-parameter |
142 | LOCAL_SHARED_LIBRARIES:= \ |
143 | libcutils \ |
144 | liblog \ |
145 | libskia \ |
146 | libandroid_runtime |
147 | |
148 | LOCAL_C_INCLUDES += external/jpeg \ |
149 | external/skia/include/core/ \ |
150 | frameworks/base/core/jni/android/graphics \ |
151 | frameworks/native/include |
152 | |
153 | LOCAL_SRC_FILES := JpegStub.cpp |
154 | |
155 | LOCAL_MODULE := camera.goldfish.jpeg |
156 | |
157 | include $(BUILD_SHARED_LIBRARY) |
158 | |
159 | endif # !PDK |
160 |