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 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 5 | hwui_src_files := \ |
| 6 | font/CacheTexture.cpp \ |
| 7 | font/Font.cpp \ |
| 8 | renderstate/Blend.cpp \ |
| 9 | renderstate/MeshState.cpp \ |
| 10 | renderstate/PixelBufferState.cpp \ |
| 11 | renderstate/RenderState.cpp \ |
| 12 | renderstate/Scissor.cpp \ |
| 13 | renderstate/Stencil.cpp \ |
| 14 | renderstate/TextureState.cpp \ |
| 15 | renderthread/CanvasContext.cpp \ |
| 16 | renderthread/DrawFrameTask.cpp \ |
| 17 | renderthread/EglManager.cpp \ |
| 18 | renderthread/RenderProxy.cpp \ |
| 19 | renderthread/RenderTask.cpp \ |
| 20 | renderthread/RenderThread.cpp \ |
| 21 | renderthread/TimeLord.cpp \ |
| 22 | thread/TaskManager.cpp \ |
| 23 | utils/Blur.cpp \ |
| 24 | utils/GLUtils.cpp \ |
| 25 | utils/LinearAllocator.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 26 | AmbientShadow.cpp \ |
| 27 | AnimationContext.cpp \ |
| 28 | Animator.cpp \ |
| 29 | AnimatorManager.cpp \ |
| 30 | AssetAtlas.cpp \ |
| 31 | Caches.cpp \ |
| 32 | CanvasState.cpp \ |
| 33 | ClipArea.cpp \ |
| 34 | DamageAccumulator.cpp \ |
| 35 | DeferredDisplayList.cpp \ |
| 36 | DeferredLayerUpdater.cpp \ |
| 37 | DisplayList.cpp \ |
| 38 | DisplayListCanvas.cpp \ |
| 39 | Dither.cpp \ |
| 40 | Extensions.cpp \ |
| 41 | FboCache.cpp \ |
| 42 | FontRenderer.cpp \ |
| 43 | FrameInfo.cpp \ |
| 44 | FrameInfoVisualizer.cpp \ |
| 45 | GammaFontRenderer.cpp \ |
| 46 | GlopBuilder.cpp \ |
| 47 | GradientCache.cpp \ |
| 48 | Image.cpp \ |
| 49 | Interpolator.cpp \ |
| 50 | JankTracker.cpp \ |
| 51 | Layer.cpp \ |
| 52 | LayerCache.cpp \ |
| 53 | LayerRenderer.cpp \ |
| 54 | Matrix.cpp \ |
| 55 | OpenGLRenderer.cpp \ |
| 56 | Patch.cpp \ |
| 57 | PatchCache.cpp \ |
| 58 | PathCache.cpp \ |
| 59 | PathTessellator.cpp \ |
| 60 | PixelBuffer.cpp \ |
| 61 | Program.cpp \ |
| 62 | ProgramCache.cpp \ |
| 63 | Properties.cpp \ |
| 64 | RenderBufferCache.cpp \ |
| 65 | RenderNode.cpp \ |
| 66 | RenderProperties.cpp \ |
| 67 | ResourceCache.cpp \ |
| 68 | ShadowTessellator.cpp \ |
| 69 | SkiaCanvas.cpp \ |
| 70 | SkiaCanvasProxy.cpp \ |
| 71 | SkiaShader.cpp \ |
| 72 | Snapshot.cpp \ |
| 73 | SpotShadow.cpp \ |
| 74 | TessellationCache.cpp \ |
| 75 | TextDropShadowCache.cpp \ |
| 76 | Texture.cpp \ |
| 77 | TextureCache.cpp |
| 78 | |
| 79 | hwui_cflags := \ |
| 80 | -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ |
| 81 | -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ |
| 82 | -Wall -Wno-unused-parameter -Wunreachable-code \ |
| 83 | -ffast-math -O3 -Werror |
| 84 | |
| 85 | ifndef HWUI_COMPILE_SYMBOLS |
| 86 | hwui_cflags += -fvisibility=hidden |
| 87 | endif |
| 88 | |
| 89 | ifdef HWUI_COMPILE_FOR_PERF |
| 90 | # TODO: Non-arm? |
| 91 | hwui_cflags += -fno-omit-frame-pointer -marm -mapcs |
| 92 | endif |
| 93 | |
| 94 | hwui_c_includes += \ |
| 95 | external/skia/src/core |
| 96 | |
| 97 | hwui_shared_libraries := \ |
| 98 | liblog \ |
| 99 | libcutils \ |
| 100 | libutils \ |
| 101 | libEGL \ |
| 102 | libGLESv2 \ |
| 103 | libskia \ |
| 104 | libui \ |
| 105 | libgui \ |
| 106 | |
| 107 | ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) |
| 108 | hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT |
| 109 | hwui_shared_libraries += libRS libRScpp |
| 110 | hwui_c_includes += \ |
| 111 | $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ |
| 112 | frameworks/rs/cpp \ |
| 113 | frameworks/rs |
| 114 | endif |
| 115 | |
| 116 | |
| 117 | # ------------------------ |
| 118 | # static library |
| 119 | # ------------------------ |
| 120 | |
| 121 | include $(CLEAR_VARS) |
| 122 | |
| 123 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 124 | LOCAL_MODULE := libhwui_static |
| 125 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 126 | LOCAL_CFLAGS := $(hwui_cflags) |
| 127 | LOCAL_SRC_FILES := $(hwui_src_files) |
| 128 | LOCAL_C_INCLUDES := $(hwui_c_includes) |
| 129 | |
| 130 | include $(BUILD_STATIC_LIBRARY) |
| 131 | |
| 132 | # ------------------------ |
| 133 | # shared library |
| 134 | # ------------------------ |
| 135 | |
| 136 | include $(CLEAR_VARS) |
| 137 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 138 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 139 | LOCAL_MODULE := libhwui |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 140 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 141 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 142 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 143 | include $(BUILD_SHARED_LIBRARY) |
Andreas Gampe | edaecc1 | 2014-11-10 20:54:07 -0800 | [diff] [blame] | 144 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 145 | # ------------------------ |
| 146 | # unit tests |
| 147 | # ------------------------ |
| 148 | |
| 149 | include $(CLEAR_VARS) |
| 150 | |
| 151 | LOCAL_MODULE := hwui_unit_tests |
| 152 | LOCAL_MODULE_TAGS := tests |
| 153 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 154 | LOCAL_STATIC_LIBRARIES := libhwui_static |
| 155 | LOCAL_C_INCLUDES := $(hwui_c_includes) |
| 156 | LOCAL_CFLAGS := $(hwui_cflags) |
| 157 | |
| 158 | LOCAL_SRC_FILES += \ |
| 159 | unit_tests/ClipAreaTests.cpp \ |
| 160 | unit_tests/DamageAccumulatorTests.cpp \ |
| 161 | unit_tests/LinearAllocatorTests.cpp |
| 162 | |
| 163 | include $(BUILD_NATIVE_TEST) |
| 164 | |
| 165 | # ------------------------ |
| 166 | # test app |
| 167 | # ------------------------ |
| 168 | |
| 169 | include $(CLEAR_VARS) |
| 170 | |
| 171 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 172 | LOCAL_MODULE:= hwuitest |
| 173 | LOCAL_MODULE_TAGS := tests |
| 174 | LOCAL_MULTILIB := both |
| 175 | LOCAL_MODULE_STEM_32 := hwuitest |
| 176 | LOCAL_MODULE_STEM_64 := hwuitest64 |
| 177 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 178 | LOCAL_CFLAGS := $(hwui_cflags) |
| 179 | LOCAL_C_INCLUDES := $(hwui_c_includes) |
| 180 | |
| 181 | HWUI_NULL_GPU := false |
| 182 | |
| 183 | ifeq (true, $(HWUI_NULL_GPU)) |
| 184 | LOCAL_SRC_FILES := \ |
| 185 | $(hwui_src_files) \ |
| 186 | tests/nullegl.cpp \ |
| 187 | tests/nullgles.cpp |
| 188 | |
| 189 | LOCAL_CFLAGS += -DHWUI_NULL_GPU |
| 190 | else |
| 191 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 192 | endif |
| 193 | |
| 194 | LOCAL_SRC_FILES += \ |
| 195 | tests/TestContext.cpp \ |
| 196 | tests/main.cpp |
| 197 | |
| 198 | include $(BUILD_EXECUTABLE) |