Android.mk revision 48cb62018c7d86f1c09935b511dfb8aa1c26ceab
1LOCAL_PATH:= $(call my-dir) 2include $(CLEAR_VARS) 3LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 4 5HWUI_NEW_OPS := true 6 7hwui_src_files := \ 8 font/CacheTexture.cpp \ 9 font/Font.cpp \ 10 renderstate/Blend.cpp \ 11 renderstate/MeshState.cpp \ 12 renderstate/OffscreenBufferPool.cpp \ 13 renderstate/PixelBufferState.cpp \ 14 renderstate/RenderState.cpp \ 15 renderstate/Scissor.cpp \ 16 renderstate/Stencil.cpp \ 17 renderstate/TextureState.cpp \ 18 renderthread/CanvasContext.cpp \ 19 renderthread/DrawFrameTask.cpp \ 20 renderthread/EglManager.cpp \ 21 renderthread/RenderProxy.cpp \ 22 renderthread/RenderTask.cpp \ 23 renderthread/RenderThread.cpp \ 24 renderthread/TimeLord.cpp \ 25 thread/TaskManager.cpp \ 26 utils/Blur.cpp \ 27 utils/GLUtils.cpp \ 28 utils/LinearAllocator.cpp \ 29 utils/NinePatchImpl.cpp \ 30 utils/StringUtils.cpp \ 31 utils/TestWindowContext.cpp \ 32 utils/VectorDrawableUtils.cpp \ 33 AmbientShadow.cpp \ 34 AnimationContext.cpp \ 35 Animator.cpp \ 36 AnimatorManager.cpp \ 37 AssetAtlas.cpp \ 38 Caches.cpp \ 39 Canvas.cpp \ 40 CanvasState.cpp \ 41 ClipArea.cpp \ 42 DamageAccumulator.cpp \ 43 DeferredDisplayList.cpp \ 44 DeferredLayerUpdater.cpp \ 45 DeviceInfo.cpp \ 46 DisplayList.cpp \ 47 DisplayListCanvas.cpp \ 48 Dither.cpp \ 49 Extensions.cpp \ 50 FboCache.cpp \ 51 FontRenderer.cpp \ 52 FrameInfo.cpp \ 53 FrameInfoVisualizer.cpp \ 54 GammaFontRenderer.cpp \ 55 GlopBuilder.cpp \ 56 GradientCache.cpp \ 57 Image.cpp \ 58 Interpolator.cpp \ 59 JankTracker.cpp \ 60 Layer.cpp \ 61 LayerCache.cpp \ 62 LayerRenderer.cpp \ 63 LayerUpdateQueue.cpp \ 64 Matrix.cpp \ 65 OpenGLRenderer.cpp \ 66 Patch.cpp \ 67 PatchCache.cpp \ 68 PathCache.cpp \ 69 PathTessellator.cpp \ 70 PathParser.cpp \ 71 PixelBuffer.cpp \ 72 Program.cpp \ 73 ProgramCache.cpp \ 74 Properties.cpp \ 75 RenderBufferCache.cpp \ 76 RenderNode.cpp \ 77 RenderProperties.cpp \ 78 ResourceCache.cpp \ 79 ShadowTessellator.cpp \ 80 SkiaCanvas.cpp \ 81 SkiaCanvasProxy.cpp \ 82 SkiaShader.cpp \ 83 Snapshot.cpp \ 84 SpotShadow.cpp \ 85 TessellationCache.cpp \ 86 TextDropShadowCache.cpp \ 87 Texture.cpp \ 88 TextureCache.cpp \ 89 VectorDrawable.cpp \ 90 protos/hwui.proto 91 92hwui_test_common_src_files := \ 93 $(call all-cpp-files-under, tests/common/scenes) \ 94 tests/common/TestContext.cpp \ 95 tests/common/TestScene.cpp \ 96 tests/common/TestUtils.cpp 97 98hwui_cflags := \ 99 -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ 100 -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ 101 -Wall -Wno-unused-parameter -Wunreachable-code -Werror 102 103# GCC false-positives on this warning, and since we -Werror that's 104# a problem 105hwui_cflags += -Wno-free-nonheap-object 106 107ifeq (true, $(HWUI_NEW_OPS)) 108 hwui_src_files += \ 109 BakedOpDispatcher.cpp \ 110 BakedOpRenderer.cpp \ 111 BakedOpState.cpp \ 112 FrameBuilder.cpp \ 113 LayerBuilder.cpp \ 114 RecordingCanvas.cpp 115 116 hwui_cflags += -DHWUI_NEW_OPS 117 118endif 119 120ifndef HWUI_COMPILE_SYMBOLS 121 hwui_cflags += -fvisibility=hidden 122endif 123 124ifdef HWUI_COMPILE_FOR_PERF 125 # TODO: Non-arm? 126 hwui_cflags += -fno-omit-frame-pointer -marm -mapcs 127endif 128 129# This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS 130# which varies depending on what is being built 131define hwui_proto_include 132$(call local-generated-sources-dir)/proto/$(LOCAL_PATH) 133endef 134 135hwui_c_includes += \ 136 external/skia/include/private \ 137 external/skia/src/core 138 139hwui_shared_libraries := \ 140 liblog \ 141 libcutils \ 142 libutils \ 143 libEGL \ 144 libGLESv2 \ 145 libskia \ 146 libui \ 147 libgui \ 148 libprotobuf-cpp-lite \ 149 150ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) 151 hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT 152 hwui_shared_libraries += libRS libRScpp 153 hwui_c_includes += \ 154 $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ 155 frameworks/rs/cpp \ 156 frameworks/rs 157endif 158 159 160# ------------------------ 161# static library 162# ------------------------ 163 164include $(CLEAR_VARS) 165 166LOCAL_MODULE_CLASS := STATIC_LIBRARIES 167LOCAL_MODULE := libhwui_static 168LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 169LOCAL_CFLAGS := $(hwui_cflags) 170LOCAL_SRC_FILES := $(hwui_src_files) 171LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) 172LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) 173 174include $(BUILD_STATIC_LIBRARY) 175 176# ------------------------ 177# static library null gpu 178# ------------------------ 179 180include $(CLEAR_VARS) 181 182LOCAL_MODULE_CLASS := STATIC_LIBRARIES 183LOCAL_MODULE := libhwui_static_null_gpu 184LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 185LOCAL_CFLAGS := \ 186 $(hwui_cflags) \ 187 -DHWUI_NULL_GPU 188LOCAL_SRC_FILES := \ 189 $(hwui_src_files) \ 190 tests/common/nullegl.cpp \ 191 tests/common/nullgles.cpp 192LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) 193LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) 194 195include $(BUILD_STATIC_LIBRARY) 196 197# ------------------------ 198# shared library 199# ------------------------ 200 201include $(CLEAR_VARS) 202 203LOCAL_MODULE_CLASS := SHARED_LIBRARIES 204LOCAL_MODULE := libhwui 205LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static 206LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 207 208include $(BUILD_SHARED_LIBRARY) 209 210# ------------------------ 211# unit tests 212# ------------------------ 213 214include $(CLEAR_VARS) 215 216LOCAL_MODULE := hwui_unit_tests 217LOCAL_MODULE_TAGS := tests 218LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 219LOCAL_STATIC_LIBRARIES := libhwui_static_null_gpu 220LOCAL_CFLAGS := \ 221 $(hwui_cflags) \ 222 -DHWUI_NULL_GPU 223 224LOCAL_SRC_FILES += \ 225 $(hwui_test_common_src_files) \ 226 tests/unit/CanvasStateTests.cpp \ 227 tests/unit/ClipAreaTests.cpp \ 228 tests/unit/DamageAccumulatorTests.cpp \ 229 tests/unit/DeviceInfoTests.cpp \ 230 tests/unit/FatVectorTests.cpp \ 231 tests/unit/LayerUpdateQueueTests.cpp \ 232 tests/unit/LinearAllocatorTests.cpp \ 233 tests/unit/VectorDrawableTests.cpp \ 234 tests/unit/OffscreenBufferPoolTests.cpp \ 235 tests/unit/StringUtilsTests.cpp 236 237ifeq (true, $(HWUI_NEW_OPS)) 238 LOCAL_SRC_FILES += \ 239 tests/unit/BakedOpStateTests.cpp \ 240 tests/unit/FrameBuilderTests.cpp \ 241 tests/unit/RecordingCanvasTests.cpp 242endif 243 244include $(BUILD_NATIVE_TEST) 245 246# ------------------------ 247# Macro-bench app 248# ------------------------ 249 250include $(CLEAR_VARS) 251 252LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp 253LOCAL_MODULE:= hwuitest 254LOCAL_MODULE_TAGS := tests 255LOCAL_MODULE_CLASS := EXECUTABLES 256LOCAL_MULTILIB := both 257LOCAL_MODULE_STEM_32 := hwuitest 258LOCAL_MODULE_STEM_64 := hwuitest64 259LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 260LOCAL_CFLAGS := $(hwui_cflags) 261 262# set to libhwui_static_null_gpu to skip actual GL commands 263LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static 264 265LOCAL_SRC_FILES += \ 266 $(hwui_test_common_src_files) \ 267 tests/macrobench/TestSceneRunner.cpp \ 268 tests/macrobench/main.cpp 269 270include $(BUILD_EXECUTABLE) 271 272# ------------------------ 273# Micro-bench app 274# --------------------- 275include $(CLEAR_VARS) 276 277LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp 278LOCAL_MODULE:= hwuimicro 279LOCAL_MODULE_TAGS := tests 280LOCAL_MODULE_CLASS := EXECUTABLES 281LOCAL_MULTILIB := both 282LOCAL_MODULE_STEM_32 := hwuimicro 283LOCAL_MODULE_STEM_64 := hwuimicro64 284LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 285LOCAL_CFLAGS := \ 286 $(hwui_cflags) \ 287 -DHWUI_NULL_GPU 288LOCAL_C_INCLUDES += bionic/benchmarks/ 289 290LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static_null_gpu 291LOCAL_STATIC_LIBRARIES := libbenchmark libbase 292 293LOCAL_SRC_FILES += \ 294 $(hwui_test_common_src_files) \ 295 tests/microbench/DisplayListCanvasBench.cpp \ 296 tests/microbench/LinearAllocatorBench.cpp \ 297 tests/microbench/PathParserBench.cpp \ 298 tests/microbench/ShadowBench.cpp 299 300# ifeq (true, $(HWUI_NEW_OPS)) 301# LOCAL_SRC_FILES += \ 302# tests/microbench/FrameBuilderBench.cpp 303# endif 304 305include $(BUILD_EXECUTABLE) 306