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