Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | include $(CLEAR_VARS) |
Dan Albert | 88ba339 | 2014-09-11 16:20:16 -0700 | [diff] [blame] | 3 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 4 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 5 | HWUI_NEW_OPS := false |
| 6 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 7 | hwui_src_files := \ |
| 8 | font/CacheTexture.cpp \ |
| 9 | font/Font.cpp \ |
| 10 | renderstate/Blend.cpp \ |
| 11 | renderstate/MeshState.cpp \ |
| 12 | renderstate/PixelBufferState.cpp \ |
| 13 | renderstate/RenderState.cpp \ |
| 14 | renderstate/Scissor.cpp \ |
| 15 | renderstate/Stencil.cpp \ |
| 16 | renderstate/TextureState.cpp \ |
| 17 | renderthread/CanvasContext.cpp \ |
| 18 | renderthread/DrawFrameTask.cpp \ |
| 19 | renderthread/EglManager.cpp \ |
| 20 | renderthread/RenderProxy.cpp \ |
| 21 | renderthread/RenderTask.cpp \ |
| 22 | renderthread/RenderThread.cpp \ |
| 23 | renderthread/TimeLord.cpp \ |
| 24 | thread/TaskManager.cpp \ |
| 25 | utils/Blur.cpp \ |
| 26 | utils/GLUtils.cpp \ |
| 27 | utils/LinearAllocator.cpp \ |
Derek Sollenberger | 4c5efe9 | 2015-07-10 13:56:39 -0400 | [diff] [blame] | 28 | utils/NinePatchImpl.cpp \ |
Chris Craik | 6e6646c | 2015-09-14 15:54:12 -0700 | [diff] [blame] | 29 | utils/StringUtils.cpp \ |
Tom Hudson | b2f5bd2 | 2015-10-15 16:41:55 -0400 | [diff] [blame] | 30 | utils/TestWindowContext.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 31 | AmbientShadow.cpp \ |
| 32 | AnimationContext.cpp \ |
| 33 | Animator.cpp \ |
| 34 | AnimatorManager.cpp \ |
| 35 | AssetAtlas.cpp \ |
| 36 | Caches.cpp \ |
| 37 | CanvasState.cpp \ |
| 38 | ClipArea.cpp \ |
| 39 | DamageAccumulator.cpp \ |
| 40 | DeferredDisplayList.cpp \ |
| 41 | DeferredLayerUpdater.cpp \ |
| 42 | DisplayList.cpp \ |
| 43 | DisplayListCanvas.cpp \ |
| 44 | Dither.cpp \ |
| 45 | Extensions.cpp \ |
| 46 | FboCache.cpp \ |
| 47 | FontRenderer.cpp \ |
| 48 | FrameInfo.cpp \ |
| 49 | FrameInfoVisualizer.cpp \ |
| 50 | GammaFontRenderer.cpp \ |
| 51 | GlopBuilder.cpp \ |
| 52 | GradientCache.cpp \ |
| 53 | Image.cpp \ |
| 54 | Interpolator.cpp \ |
| 55 | JankTracker.cpp \ |
| 56 | Layer.cpp \ |
| 57 | LayerCache.cpp \ |
| 58 | LayerRenderer.cpp \ |
Chris Craik | 0b7e824 | 2015-10-28 16:50:44 -0700 | [diff] [blame^] | 59 | LayerUpdateQueue.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 60 | Matrix.cpp \ |
| 61 | OpenGLRenderer.cpp \ |
| 62 | Patch.cpp \ |
| 63 | PatchCache.cpp \ |
| 64 | PathCache.cpp \ |
| 65 | PathTessellator.cpp \ |
| 66 | PixelBuffer.cpp \ |
| 67 | Program.cpp \ |
| 68 | ProgramCache.cpp \ |
| 69 | Properties.cpp \ |
| 70 | RenderBufferCache.cpp \ |
| 71 | RenderNode.cpp \ |
| 72 | RenderProperties.cpp \ |
| 73 | ResourceCache.cpp \ |
| 74 | ShadowTessellator.cpp \ |
| 75 | SkiaCanvas.cpp \ |
| 76 | SkiaCanvasProxy.cpp \ |
| 77 | SkiaShader.cpp \ |
| 78 | Snapshot.cpp \ |
| 79 | SpotShadow.cpp \ |
| 80 | TessellationCache.cpp \ |
| 81 | TextDropShadowCache.cpp \ |
| 82 | Texture.cpp \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 83 | TextureCache.cpp \ |
| 84 | protos/hwui.proto |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 85 | |
| 86 | hwui_cflags := \ |
| 87 | -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ |
| 88 | -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ |
John Reck | 82f5e0c | 2015-10-22 17:07:45 -0700 | [diff] [blame] | 89 | -Wall -Wno-unused-parameter -Wunreachable-code -Werror |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 90 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 91 | ifeq (true, $(HWUI_NEW_OPS)) |
| 92 | hwui_src_files += \ |
| 93 | BakedOpRenderer.cpp \ |
| 94 | OpReorderer.cpp \ |
| 95 | RecordingCanvas.cpp |
| 96 | |
| 97 | hwui_cflags += -DHWUI_NEW_OPS |
| 98 | |
| 99 | endif |
| 100 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 101 | ifndef HWUI_COMPILE_SYMBOLS |
| 102 | hwui_cflags += -fvisibility=hidden |
| 103 | endif |
| 104 | |
| 105 | ifdef HWUI_COMPILE_FOR_PERF |
| 106 | # TODO: Non-arm? |
| 107 | hwui_cflags += -fno-omit-frame-pointer -marm -mapcs |
| 108 | endif |
| 109 | |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 110 | # This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS |
| 111 | # which varies depending on what is being built |
| 112 | define hwui_proto_include |
| 113 | $(call local-generated-sources-dir)/proto/$(LOCAL_PATH) |
| 114 | endef |
| 115 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 116 | hwui_c_includes += \ |
Leon Scroggins III | 5507807 | 2015-07-31 10:38:40 -0400 | [diff] [blame] | 117 | external/skia/include/private \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 118 | external/skia/src/core |
| 119 | |
| 120 | hwui_shared_libraries := \ |
| 121 | liblog \ |
| 122 | libcutils \ |
| 123 | libutils \ |
| 124 | libEGL \ |
| 125 | libGLESv2 \ |
| 126 | libskia \ |
| 127 | libui \ |
| 128 | libgui \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 129 | libprotobuf-cpp-lite \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 130 | |
| 131 | ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) |
| 132 | hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT |
| 133 | hwui_shared_libraries += libRS libRScpp |
| 134 | hwui_c_includes += \ |
| 135 | $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ |
| 136 | frameworks/rs/cpp \ |
| 137 | frameworks/rs |
| 138 | endif |
| 139 | |
| 140 | |
| 141 | # ------------------------ |
| 142 | # static library |
| 143 | # ------------------------ |
| 144 | |
| 145 | include $(CLEAR_VARS) |
| 146 | |
| 147 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 148 | LOCAL_MODULE := libhwui_static |
| 149 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 150 | LOCAL_CFLAGS := $(hwui_cflags) |
| 151 | LOCAL_SRC_FILES := $(hwui_src_files) |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 152 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 153 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 154 | |
| 155 | include $(BUILD_STATIC_LIBRARY) |
| 156 | |
| 157 | # ------------------------ |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 158 | # static library null gpu |
| 159 | # ------------------------ |
| 160 | |
| 161 | include $(CLEAR_VARS) |
| 162 | |
| 163 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 164 | LOCAL_MODULE := libhwui_static_null_gpu |
| 165 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 166 | LOCAL_CFLAGS := \ |
| 167 | $(hwui_cflags) \ |
| 168 | -DHWUI_NULL_GPU |
| 169 | LOCAL_SRC_FILES := \ |
| 170 | $(hwui_src_files) \ |
| 171 | tests/nullegl.cpp \ |
| 172 | tests/nullgles.cpp |
| 173 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 174 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) |
| 175 | |
| 176 | include $(BUILD_STATIC_LIBRARY) |
| 177 | |
| 178 | # ------------------------ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 179 | # shared library |
| 180 | # ------------------------ |
| 181 | |
| 182 | include $(CLEAR_VARS) |
| 183 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 184 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 185 | LOCAL_MODULE := libhwui |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 186 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 187 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 188 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 189 | include $(BUILD_SHARED_LIBRARY) |
Andreas Gampe | edaecc1 | 2014-11-10 20:54:07 -0800 | [diff] [blame] | 190 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 191 | # ------------------------ |
| 192 | # unit tests |
| 193 | # ------------------------ |
| 194 | |
| 195 | include $(CLEAR_VARS) |
| 196 | |
| 197 | LOCAL_MODULE := hwui_unit_tests |
| 198 | LOCAL_MODULE_TAGS := tests |
| 199 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 200 | LOCAL_STATIC_LIBRARIES := libhwui_static_null_gpu |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 201 | LOCAL_CFLAGS := $(hwui_cflags) |
| 202 | |
| 203 | LOCAL_SRC_FILES += \ |
Chris Craik | 9557106 | 2015-09-02 12:55:52 -0700 | [diff] [blame] | 204 | unit_tests/CanvasStateTests.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 205 | unit_tests/ClipAreaTests.cpp \ |
| 206 | unit_tests/DamageAccumulatorTests.cpp \ |
Chris Craik | 76ace11 | 2015-10-29 12:46:19 -0700 | [diff] [blame] | 207 | unit_tests/FatVectorTests.cpp \ |
Chris Craik | 0b7e824 | 2015-10-28 16:50:44 -0700 | [diff] [blame^] | 208 | unit_tests/LayerUpdateQueueTests.cpp \ |
Chris Craik | 6e6646c | 2015-09-14 15:54:12 -0700 | [diff] [blame] | 209 | unit_tests/LinearAllocatorTests.cpp \ |
| 210 | unit_tests/StringUtilsTests.cpp |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 211 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 212 | ifeq (true, $(HWUI_NEW_OPS)) |
| 213 | LOCAL_SRC_FILES += \ |
| 214 | unit_tests/BakedOpStateTests.cpp \ |
| 215 | unit_tests/RecordingCanvasTests.cpp \ |
| 216 | unit_tests/OpReordererTests.cpp |
| 217 | endif |
| 218 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 219 | include $(BUILD_NATIVE_TEST) |
| 220 | |
| 221 | # ------------------------ |
| 222 | # test app |
| 223 | # ------------------------ |
| 224 | |
| 225 | include $(CLEAR_VARS) |
| 226 | |
| 227 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 228 | LOCAL_MODULE:= hwuitest |
| 229 | LOCAL_MODULE_TAGS := tests |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 230 | LOCAL_MODULE_CLASS := EXECUTABLES |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 231 | LOCAL_MULTILIB := both |
| 232 | LOCAL_MODULE_STEM_32 := hwuitest |
| 233 | LOCAL_MODULE_STEM_64 := hwuitest64 |
| 234 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 235 | LOCAL_CFLAGS := $(hwui_cflags) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 236 | |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 237 | # set to libhwui_static_null_gpu to skip actual GL commands |
| 238 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 239 | |
| 240 | LOCAL_SRC_FILES += \ |
| 241 | tests/TestContext.cpp \ |
John Reck | e702c9c | 2015-10-07 10:26:02 -0700 | [diff] [blame] | 242 | tests/TreeContentAnimation.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 243 | tests/main.cpp |
| 244 | |
| 245 | include $(BUILD_EXECUTABLE) |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 246 | |
| 247 | # ------------------------ |
| 248 | # Micro-bench app |
| 249 | # --------------------- |
| 250 | include $(CLEAR_VARS) |
| 251 | |
| 252 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 253 | LOCAL_MODULE:= hwuimicro |
| 254 | LOCAL_MODULE_TAGS := tests |
| 255 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 256 | LOCAL_MULTILIB := both |
| 257 | LOCAL_MODULE_STEM_32 := hwuimicro |
| 258 | LOCAL_MODULE_STEM_64 := hwuimicro64 |
| 259 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 260 | LOCAL_CFLAGS := $(hwui_cflags) |
| 261 | LOCAL_C_INCLUDES += bionic/benchmarks/ |
| 262 | |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 263 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static_null_gpu |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 264 | LOCAL_STATIC_LIBRARIES := libbenchmark libbase |
| 265 | |
| 266 | LOCAL_SRC_FILES += \ |
Chris Craik | 81a1d2a | 2015-10-15 17:13:00 -0700 | [diff] [blame] | 267 | microbench/DisplayListCanvasBench.cpp \ |
John Reck | 82f5e0c | 2015-10-22 17:07:45 -0700 | [diff] [blame] | 268 | microbench/LinearAllocatorBench.cpp \ |
| 269 | microbench/ShadowBench.cpp |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 270 | |
Chris Craik | 0a24b14 | 2015-10-19 17:10:19 -0700 | [diff] [blame] | 271 | ifeq (true, $(HWUI_NEW_OPS)) |
| 272 | LOCAL_SRC_FILES += \ |
| 273 | microbench/OpReordererBench.cpp |
| 274 | endif |
| 275 | |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 276 | include $(BUILD_EXECUTABLE) |