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 \ |
Derek Sollenberger | 4c5efe9 | 2015-07-10 13:56:39 -0400 | [diff] [blame] | 26 | utils/NinePatchImpl.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 27 | AmbientShadow.cpp \ |
| 28 | AnimationContext.cpp \ |
| 29 | Animator.cpp \ |
| 30 | AnimatorManager.cpp \ |
| 31 | AssetAtlas.cpp \ |
| 32 | Caches.cpp \ |
| 33 | CanvasState.cpp \ |
| 34 | ClipArea.cpp \ |
| 35 | DamageAccumulator.cpp \ |
| 36 | DeferredDisplayList.cpp \ |
| 37 | DeferredLayerUpdater.cpp \ |
| 38 | DisplayList.cpp \ |
| 39 | DisplayListCanvas.cpp \ |
| 40 | Dither.cpp \ |
| 41 | Extensions.cpp \ |
| 42 | FboCache.cpp \ |
| 43 | FontRenderer.cpp \ |
| 44 | FrameInfo.cpp \ |
| 45 | FrameInfoVisualizer.cpp \ |
| 46 | GammaFontRenderer.cpp \ |
| 47 | GlopBuilder.cpp \ |
| 48 | GradientCache.cpp \ |
| 49 | Image.cpp \ |
| 50 | Interpolator.cpp \ |
| 51 | JankTracker.cpp \ |
| 52 | Layer.cpp \ |
| 53 | LayerCache.cpp \ |
| 54 | LayerRenderer.cpp \ |
| 55 | Matrix.cpp \ |
| 56 | OpenGLRenderer.cpp \ |
| 57 | Patch.cpp \ |
| 58 | PatchCache.cpp \ |
| 59 | PathCache.cpp \ |
| 60 | PathTessellator.cpp \ |
| 61 | PixelBuffer.cpp \ |
| 62 | Program.cpp \ |
| 63 | ProgramCache.cpp \ |
| 64 | Properties.cpp \ |
| 65 | RenderBufferCache.cpp \ |
| 66 | RenderNode.cpp \ |
| 67 | RenderProperties.cpp \ |
| 68 | ResourceCache.cpp \ |
| 69 | ShadowTessellator.cpp \ |
| 70 | SkiaCanvas.cpp \ |
| 71 | SkiaCanvasProxy.cpp \ |
| 72 | SkiaShader.cpp \ |
| 73 | Snapshot.cpp \ |
| 74 | SpotShadow.cpp \ |
| 75 | TessellationCache.cpp \ |
| 76 | TextDropShadowCache.cpp \ |
| 77 | Texture.cpp \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 78 | TextureCache.cpp \ |
| 79 | protos/hwui.proto |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 80 | |
| 81 | hwui_cflags := \ |
| 82 | -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ |
| 83 | -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ |
| 84 | -Wall -Wno-unused-parameter -Wunreachable-code \ |
| 85 | -ffast-math -O3 -Werror |
| 86 | |
| 87 | ifndef HWUI_COMPILE_SYMBOLS |
| 88 | hwui_cflags += -fvisibility=hidden |
| 89 | endif |
| 90 | |
| 91 | ifdef HWUI_COMPILE_FOR_PERF |
| 92 | # TODO: Non-arm? |
| 93 | hwui_cflags += -fno-omit-frame-pointer -marm -mapcs |
| 94 | endif |
| 95 | |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 96 | # This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS |
| 97 | # which varies depending on what is being built |
| 98 | define hwui_proto_include |
| 99 | $(call local-generated-sources-dir)/proto/$(LOCAL_PATH) |
| 100 | endef |
| 101 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 102 | hwui_c_includes += \ |
| 103 | external/skia/src/core |
| 104 | |
| 105 | hwui_shared_libraries := \ |
| 106 | liblog \ |
| 107 | libcutils \ |
| 108 | libutils \ |
| 109 | libEGL \ |
| 110 | libGLESv2 \ |
| 111 | libskia \ |
| 112 | libui \ |
| 113 | libgui \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 114 | libprotobuf-cpp-lite \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 115 | |
| 116 | ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) |
| 117 | hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT |
| 118 | hwui_shared_libraries += libRS libRScpp |
| 119 | hwui_c_includes += \ |
| 120 | $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ |
| 121 | frameworks/rs/cpp \ |
| 122 | frameworks/rs |
| 123 | endif |
| 124 | |
| 125 | |
| 126 | # ------------------------ |
| 127 | # static library |
| 128 | # ------------------------ |
| 129 | |
| 130 | include $(CLEAR_VARS) |
| 131 | |
| 132 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 133 | LOCAL_MODULE := libhwui_static |
| 134 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 135 | LOCAL_CFLAGS := $(hwui_cflags) |
| 136 | LOCAL_SRC_FILES := $(hwui_src_files) |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 137 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 138 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 139 | |
| 140 | include $(BUILD_STATIC_LIBRARY) |
| 141 | |
| 142 | # ------------------------ |
| 143 | # shared library |
| 144 | # ------------------------ |
| 145 | |
| 146 | include $(CLEAR_VARS) |
| 147 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 148 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 149 | LOCAL_MODULE := libhwui |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 150 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 151 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 152 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 153 | include $(BUILD_SHARED_LIBRARY) |
Andreas Gampe | edaecc1 | 2014-11-10 20:54:07 -0800 | [diff] [blame] | 154 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 155 | # ------------------------ |
| 156 | # unit tests |
| 157 | # ------------------------ |
| 158 | |
| 159 | include $(CLEAR_VARS) |
| 160 | |
| 161 | LOCAL_MODULE := hwui_unit_tests |
| 162 | LOCAL_MODULE_TAGS := tests |
| 163 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 164 | LOCAL_STATIC_LIBRARIES := libhwui_static |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 165 | LOCAL_CFLAGS := $(hwui_cflags) |
| 166 | |
| 167 | LOCAL_SRC_FILES += \ |
Chris Craik | 9557106 | 2015-09-02 12:55:52 -0700 | [diff] [blame^] | 168 | unit_tests/CanvasStateTests.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 169 | unit_tests/ClipAreaTests.cpp \ |
| 170 | unit_tests/DamageAccumulatorTests.cpp \ |
| 171 | unit_tests/LinearAllocatorTests.cpp |
| 172 | |
| 173 | include $(BUILD_NATIVE_TEST) |
| 174 | |
| 175 | # ------------------------ |
| 176 | # test app |
| 177 | # ------------------------ |
| 178 | |
| 179 | include $(CLEAR_VARS) |
| 180 | |
| 181 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 182 | LOCAL_MODULE:= hwuitest |
| 183 | LOCAL_MODULE_TAGS := tests |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 184 | LOCAL_MODULE_CLASS := EXECUTABLES |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 185 | LOCAL_MULTILIB := both |
| 186 | LOCAL_MODULE_STEM_32 := hwuitest |
| 187 | LOCAL_MODULE_STEM_64 := hwuitest64 |
| 188 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 189 | LOCAL_CFLAGS := $(hwui_cflags) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 190 | |
| 191 | HWUI_NULL_GPU := false |
| 192 | |
| 193 | ifeq (true, $(HWUI_NULL_GPU)) |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 194 | # Only need to specify the includes if we are not linking against |
| 195 | # libhwui_static as libhwui_static exports the appropriate includes |
| 196 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 197 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 198 | LOCAL_SRC_FILES := \ |
| 199 | $(hwui_src_files) \ |
| 200 | tests/nullegl.cpp \ |
| 201 | tests/nullgles.cpp |
| 202 | |
| 203 | LOCAL_CFLAGS += -DHWUI_NULL_GPU |
| 204 | else |
| 205 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 206 | endif |
| 207 | |
| 208 | LOCAL_SRC_FILES += \ |
| 209 | tests/TestContext.cpp \ |
| 210 | tests/main.cpp |
| 211 | |
| 212 | include $(BUILD_EXECUTABLE) |