Android.mk revision e4db79de127cfe961195f52907af8451026eaa20
1LOCAL_PATH:= $(call my-dir) 2include $(CLEAR_VARS) 3LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 4 5HWUI_NEW_OPS := false 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 VectorDrawablePath.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 OpReorderer.cpp \ 113 RecordingCanvas.cpp 114 115 hwui_cflags += -DHWUI_NEW_OPS 116 117endif 118 119ifndef HWUI_COMPILE_SYMBOLS 120 hwui_cflags += -fvisibility=hidden 121endif 122 123ifdef HWUI_COMPILE_FOR_PERF 124 # TODO: Non-arm? 125 hwui_cflags += -fno-omit-frame-pointer -marm -mapcs 126endif 127 128# This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS 129# which varies depending on what is being built 130define hwui_proto_include 131$(call local-generated-sources-dir)/proto/$(LOCAL_PATH) 132endef 133 134hwui_c_includes += \ 135 external/skia/include/private \ 136 external/skia/src/core 137 138hwui_shared_libraries := \ 139 liblog \ 140 libcutils \ 141 libutils \ 142 libEGL \ 143 libGLESv2 \ 144 libskia \ 145 libui \ 146 libgui \ 147 libprotobuf-cpp-lite \ 148 149ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) 150 hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT 151 hwui_shared_libraries += libRS libRScpp 152 hwui_c_includes += \ 153 $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ 154 frameworks/rs/cpp \ 155 frameworks/rs 156endif 157 158 159# ------------------------ 160# static library 161# ------------------------ 162 163include $(CLEAR_VARS) 164 165LOCAL_MODULE_CLASS := STATIC_LIBRARIES 166LOCAL_MODULE := libhwui_static 167LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 168LOCAL_CFLAGS := $(hwui_cflags) 169LOCAL_SRC_FILES := $(hwui_src_files) 170LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) 171LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) 172 173include $(BUILD_STATIC_LIBRARY) 174 175# ------------------------ 176# static library null gpu 177# ------------------------ 178 179include $(CLEAR_VARS) 180 181LOCAL_MODULE_CLASS := STATIC_LIBRARIES 182LOCAL_MODULE := libhwui_static_null_gpu 183LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 184LOCAL_CFLAGS := \ 185 $(hwui_cflags) \ 186 -DHWUI_NULL_GPU 187LOCAL_SRC_FILES := \ 188 $(hwui_src_files) \ 189 tests/common/nullegl.cpp \ 190 tests/common/nullgles.cpp 191LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) 192LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) 193 194include $(BUILD_STATIC_LIBRARY) 195 196# ------------------------ 197# shared library 198# ------------------------ 199 200include $(CLEAR_VARS) 201 202LOCAL_MODULE_CLASS := SHARED_LIBRARIES 203LOCAL_MODULE := libhwui 204LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static 205LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 206 207include $(BUILD_SHARED_LIBRARY) 208 209# ------------------------ 210# unit tests 211# ------------------------ 212 213include $(CLEAR_VARS) 214 215LOCAL_MODULE := hwui_unit_tests 216LOCAL_MODULE_TAGS := tests 217LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 218LOCAL_STATIC_LIBRARIES := libhwui_static_null_gpu 219LOCAL_CFLAGS := \ 220 $(hwui_cflags) \ 221 -DHWUI_NULL_GPU 222 223LOCAL_SRC_FILES += \ 224 $(hwui_test_common_src_files) \ 225 tests/unit/CanvasStateTests.cpp \ 226 tests/unit/ClipAreaTests.cpp \ 227 tests/unit/DamageAccumulatorTests.cpp \ 228 tests/unit/DeviceInfoTests.cpp \ 229 tests/unit/FatVectorTests.cpp \ 230 tests/unit/LayerUpdateQueueTests.cpp \ 231 tests/unit/LinearAllocatorTests.cpp \ 232 tests/unit/VectorDrawableTests.cpp \ 233 tests/unit/OffscreenBufferPoolTests.cpp \ 234 tests/unit/StringUtilsTests.cpp 235 236ifeq (true, $(HWUI_NEW_OPS)) 237 LOCAL_SRC_FILES += \ 238 tests/unit/BakedOpStateTests.cpp \ 239 tests/unit/RecordingCanvasTests.cpp \ 240 tests/unit/OpReordererTests.cpp 241endif 242 243include $(BUILD_NATIVE_TEST) 244 245# ------------------------ 246# Macro-bench app 247# ------------------------ 248 249include $(CLEAR_VARS) 250 251LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp 252LOCAL_MODULE:= hwuitest 253LOCAL_MODULE_TAGS := tests 254LOCAL_MODULE_CLASS := EXECUTABLES 255LOCAL_MULTILIB := both 256LOCAL_MODULE_STEM_32 := hwuitest 257LOCAL_MODULE_STEM_64 := hwuitest64 258LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 259LOCAL_CFLAGS := $(hwui_cflags) 260 261# set to libhwui_static_null_gpu to skip actual GL commands 262LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static 263 264LOCAL_SRC_FILES += \ 265 $(hwui_test_common_src_files) \ 266 tests/macrobench/TestSceneRunner.cpp \ 267 tests/macrobench/main.cpp 268 269include $(BUILD_EXECUTABLE) 270 271# ------------------------ 272# Micro-bench app 273# --------------------- 274include $(CLEAR_VARS) 275 276LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp 277LOCAL_MODULE:= hwuimicro 278LOCAL_MODULE_TAGS := tests 279LOCAL_MODULE_CLASS := EXECUTABLES 280LOCAL_MULTILIB := both 281LOCAL_MODULE_STEM_32 := hwuimicro 282LOCAL_MODULE_STEM_64 := hwuimicro64 283LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) 284LOCAL_CFLAGS := \ 285 $(hwui_cflags) \ 286 -DHWUI_NULL_GPU 287LOCAL_C_INCLUDES += bionic/benchmarks/ 288 289LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static_null_gpu 290LOCAL_STATIC_LIBRARIES := libbenchmark libbase 291 292LOCAL_SRC_FILES += \ 293 $(hwui_test_common_src_files) \ 294 tests/microbench/DisplayListCanvasBench.cpp \ 295 tests/microbench/LinearAllocatorBench.cpp \ 296 tests/microbench/PathParserBench.cpp \ 297 tests/microbench/ShadowBench.cpp 298 299ifeq (true, $(HWUI_NEW_OPS)) 300 LOCAL_SRC_FILES += \ 301 tests/microbench/OpReordererBench.cpp 302endif 303 304include $(BUILD_EXECUTABLE) 305