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