Jason Sams | 5e172b0 | 2009-07-23 16:10:46 -0700 | [diff] [blame] | 1 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 2 | LOCAL_PATH:=$(call my-dir) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 3 | |
Chris Wailes | 93d6bc8 | 2014-07-28 16:54:38 -0700 | [diff] [blame] | 4 | rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -fno-exceptions -std=c++11 |
Stephen Hines | ebee948 | 2012-05-09 11:53:24 -0700 | [diff] [blame] | 5 | ifeq ($(TARGET_BUILD_PDK), true) |
| 6 | rs_base_CFLAGS += -D__RS_PDK__ |
| 7 | endif |
| 8 | |
Stephen Hines | 91dfcdb | 2012-09-07 18:23:35 -0700 | [diff] [blame] | 9 | ifneq ($(OVERRIDE_RS_DRIVER),) |
| 10 | rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER) |
| 11 | endif |
| 12 | |
Tim Murray | 6e6cdbc | 2014-09-10 15:58:54 -0700 | [diff] [blame] | 13 | ifneq ($(DISABLE_RS_64_BIT_DRIVER),) |
| 14 | rs_base_CFLAGS += -DDISABLE_RS_64_BIT_DRIVER |
| 15 | endif |
| 16 | |
Tim Murray | e3af53b | 2014-06-10 09:46:51 -0700 | [diff] [blame] | 17 | ifeq ($(RS_FIND_OFFSETS), true) |
| 18 | rs_base_CFLAGS += -DRS_FIND_OFFSETS |
| 19 | endif |
| 20 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 21 | include $(CLEAR_VARS) |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 22 | ifneq ($(HOST_OS),windows) |
Stephen Hines | f098424 | 2012-05-11 17:41:36 -0700 | [diff] [blame] | 23 | LOCAL_CLANG := true |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 24 | endif |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 25 | LOCAL_MODULE := libRSDriver |
Duane Sand | e8e408a | 2014-05-13 16:46:02 -0700 | [diff] [blame] | 26 | LOCAL_MODULE_TARGET_ARCH_WARN := arm mips mips64 x86 x86_64 arm64 |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 27 | |
| 28 | LOCAL_SRC_FILES:= \ |
| 29 | driver/rsdAllocation.cpp \ |
| 30 | driver/rsdBcc.cpp \ |
| 31 | driver/rsdCore.cpp \ |
Jason Sams | a36c50a | 2014-06-17 12:06:06 -0700 | [diff] [blame] | 32 | driver/rsdElement.cpp \ |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 33 | driver/rsdFrameBuffer.cpp \ |
| 34 | driver/rsdFrameBufferObj.cpp \ |
| 35 | driver/rsdGL.cpp \ |
| 36 | driver/rsdMesh.cpp \ |
| 37 | driver/rsdMeshObj.cpp \ |
| 38 | driver/rsdPath.cpp \ |
| 39 | driver/rsdProgram.cpp \ |
| 40 | driver/rsdProgramRaster.cpp \ |
| 41 | driver/rsdProgramStore.cpp \ |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 42 | driver/rsdRuntimeStubs.cpp \ |
| 43 | driver/rsdSampler.cpp \ |
Jason Sams | dbe66d6 | 2012-09-17 13:54:41 -0700 | [diff] [blame] | 44 | driver/rsdScriptGroup.cpp \ |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 45 | driver/rsdShader.cpp \ |
| 46 | driver/rsdShaderCache.cpp \ |
Jason Sams | a36c50a | 2014-06-17 12:06:06 -0700 | [diff] [blame] | 47 | driver/rsdType.cpp \ |
Jason Sams | 6d958bc | 2012-09-04 15:14:05 -0700 | [diff] [blame] | 48 | driver/rsdVertexArray.cpp |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 49 | |
Jason Sams | e1e08b4 | 2012-09-04 16:49:19 -0700 | [diff] [blame] | 50 | |
Hans Boehm | 564e53a | 2014-10-01 16:14:48 -0700 | [diff] [blame] | 51 | LOCAL_SHARED_LIBRARIES += libRS libRSCpuRef |
Ying Wang | b241181 | 2013-04-09 21:56:34 -0700 | [diff] [blame] | 52 | LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libEGL libGLESv1_CM libGLESv2 |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 53 | LOCAL_SHARED_LIBRARIES += libui libgui libsync |
| 54 | |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 55 | LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libLLVM |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 56 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 57 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
Stephen Hines | 6ba6c66 | 2013-07-12 20:16:51 -0700 | [diff] [blame] | 58 | LOCAL_C_INCLUDES += frameworks/rs/cpu_ref/linkloader/include |
Hans Boehm | 564e53a | 2014-10-01 16:14:48 -0700 | [diff] [blame] | 59 | |
| 60 | LOCAL_CXX_STL := libc++ |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 61 | |
Stephen Hines | ebee948 | 2012-05-09 11:53:24 -0700 | [diff] [blame] | 62 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 63 | LOCAL_CPPFLAGS += -fno-exceptions |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 64 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 65 | LOCAL_MODULE_TAGS := optional |
| 66 | |
Stephen Hines | 414a461 | 2012-09-05 18:05:08 -0700 | [diff] [blame] | 67 | include $(BUILD_SHARED_LIBRARY) |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 68 | |
| 69 | # Build rsg-generator ==================== |
| 70 | include $(CLEAR_VARS) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 71 | |
| 72 | LOCAL_MODULE := rsg-generator |
| 73 | |
| 74 | # These symbols are normally defined by BUILD_XXX, but we need to define them |
| 75 | # here so that local-intermediates-dir works. |
| 76 | |
| 77 | LOCAL_IS_HOST_MODULE := true |
| 78 | LOCAL_MODULE_CLASS := EXECUTABLES |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 79 | intermediates := $(local-intermediates-dir) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 80 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 81 | LOCAL_SRC_FILES:= \ |
Joe Onorato | 84614dd | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 82 | spec.l \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 83 | rsg_generator.c |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 84 | |
Stephen Hines | 4b89886 | 2014-11-07 12:30:02 -0800 | [diff] [blame] | 85 | LOCAL_CXX_STL := none |
Dan Albert | abe54a2 | 2014-12-05 22:23:29 -0800 | [diff] [blame^] | 86 | LOCAL_ADDRESS_SANITIZER := false |
Stephen Hines | 4b89886 | 2014-11-07 12:30:02 -0800 | [diff] [blame] | 87 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 88 | include $(BUILD_HOST_EXECUTABLE) |
| 89 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 90 | # TODO: This should go into build/core/config.mk |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 91 | RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) |
| 92 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 93 | include $(CLEAR_VARS) |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 94 | ifneq ($(HOST_OS),windows) |
Stephen Hines | f098424 | 2012-05-11 17:41:36 -0700 | [diff] [blame] | 95 | LOCAL_CLANG := true |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 96 | endif |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 97 | LOCAL_MODULE := libRS |
Duane Sand | e8e408a | 2014-05-13 16:46:02 -0700 | [diff] [blame] | 98 | LOCAL_MODULE_TARGET_ARCH_WARN := arm mips mips64 x86 x86_64 arm64 |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 99 | |
| 100 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
Colin Cross | 165aa63 | 2014-02-06 17:14:48 -0800 | [diff] [blame] | 101 | generated_sources:= $(local-generated-sources-dir) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 102 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 103 | # Generate custom headers |
| 104 | |
Colin Cross | 165aa63 | 2014-02-06 17:14:48 -0800 | [diff] [blame] | 105 | GEN := $(addprefix $(generated_sources)/, \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 106 | rsgApiStructs.h \ |
| 107 | rsgApiFuncDecl.h \ |
| 108 | ) |
| 109 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 110 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
Tim Murray | 2487bb7 | 2013-03-18 16:41:32 -0700 | [diff] [blame] | 111 | $(GEN) : PRIVATE_CUSTOM_TOOL = cat $(PRIVATE_PATH)/rs.spec $(PRIVATE_PATH)/rsg.spec $(PRIVATE_PATH)/rs_native.spec | $(RSG_GENERATOR) $< $@ |
| 112 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec $(LOCAL_PATH)/rsg.spec $(LOCAL_PATH)/rs_native.spec |
Colin Cross | 165aa63 | 2014-02-06 17:14:48 -0800 | [diff] [blame] | 113 | $(GEN): $(generated_sources)/%.h : $(LOCAL_PATH)/%.h.rsg |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 114 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 115 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 116 | # used in jni/Android.mk |
| 117 | rs_generated_source += $(GEN) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 118 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 119 | |
| 120 | # Generate custom source files |
| 121 | |
Colin Cross | 165aa63 | 2014-02-06 17:14:48 -0800 | [diff] [blame] | 122 | GEN := $(addprefix $(generated_sources)/, \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 123 | rsgApi.cpp \ |
| 124 | rsgApiReplay.cpp \ |
| 125 | ) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 126 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 127 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
Tim Murray | 2487bb7 | 2013-03-18 16:41:32 -0700 | [diff] [blame] | 128 | $(GEN) : PRIVATE_CUSTOM_TOOL = cat $(PRIVATE_PATH)/rs.spec $(PRIVATE_PATH)/rsg.spec $(PRIVATE_PATH)/rs_native.spec | $(RSG_GENERATOR) $< $@ |
| 129 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec $(LOCAL_PATH)/rsg.spec $(LOCAL_PATH)/rs_native.spec |
Colin Cross | 165aa63 | 2014-02-06 17:14:48 -0800 | [diff] [blame] | 130 | $(GEN): $(generated_sources)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 131 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 132 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 133 | # used in jni/Android.mk |
| 134 | rs_generated_source += $(GEN) |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 135 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 136 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 137 | |
| 138 | LOCAL_SRC_FILES:= \ |
| 139 | rsAdapter.cpp \ |
| 140 | rsAllocation.cpp \ |
Jason Sams | c1ed589 | 2010-03-10 17:30:41 -0800 | [diff] [blame] | 141 | rsAnimation.cpp \ |
Jason Sams | d01d970 | 2009-12-23 14:35:29 -0800 | [diff] [blame] | 142 | rsComponent.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 143 | rsContext.cpp \ |
Jason Sams | f313dc3 | 2013-07-09 14:29:39 -0700 | [diff] [blame] | 144 | rsCppUtils.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 145 | rsDevice.cpp \ |
| 146 | rsElement.cpp \ |
Alex Sakhartchouk | 7d9c5ff | 2011-04-01 14:19:01 -0700 | [diff] [blame] | 147 | rsFBOCache.cpp \ |
Jason Sams | 2008747 | 2011-05-06 14:14:30 -0700 | [diff] [blame] | 148 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 149 | rsFileA3D.cpp \ |
| 150 | rsFont.cpp \ |
Jason Sams | ddceab9 | 2013-08-07 13:02:32 -0700 | [diff] [blame] | 151 | rsGrallocConsumer.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 152 | rsObjectBase.cpp \ |
Jason Sams | 87fe59a | 2011-04-20 15:09:01 -0700 | [diff] [blame] | 153 | rsMatrix2x2.cpp \ |
| 154 | rsMatrix3x3.cpp \ |
| 155 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 156 | rsMesh.cpp \ |
| 157 | rsMutex.cpp \ |
Jason Sams | 9e0afb5 | 2011-10-31 13:23:43 -0700 | [diff] [blame] | 158 | rsPath.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 159 | rsProgram.cpp \ |
| 160 | rsProgramFragment.cpp \ |
Jason Sams | ccc010b | 2010-05-13 18:30:11 -0700 | [diff] [blame] | 161 | rsProgramStore.cpp \ |
Jason Sams | 5fd09d8 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 162 | rsProgramRaster.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 163 | rsProgramVertex.cpp \ |
| 164 | rsSampler.cpp \ |
| 165 | rsScript.cpp \ |
| 166 | rsScriptC.cpp \ |
Jason Sams | e45ac6e | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 167 | rsScriptC_Lib.cpp \ |
Jason Sams | aeb094b | 2010-05-18 13:35:45 -0700 | [diff] [blame] | 168 | rsScriptC_LibGL.cpp \ |
Jason Sams | dbe66d6 | 2012-09-17 13:54:41 -0700 | [diff] [blame] | 169 | rsScriptGroup.cpp \ |
Jason Sams | 8eaba4f | 2012-08-14 14:38:05 -0700 | [diff] [blame] | 170 | rsScriptIntrinsic.cpp \ |
Jason Sams | 12b14ae | 2010-03-18 11:39:44 -0700 | [diff] [blame] | 171 | rsSignal.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 172 | rsStream.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 173 | rsThreadIO.cpp \ |
Jason Sams | a662edd | 2012-04-02 15:00:10 -0700 | [diff] [blame] | 174 | rsType.cpp |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 175 | |
Hans Boehm | 564e53a | 2014-10-01 16:14:48 -0700 | [diff] [blame] | 176 | LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libEGL libGLESv1_CM libGLESv2 |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 177 | LOCAL_SHARED_LIBRARIES += libgui libsync libdl libui |
Victoria Lease | b9a4d82 | 2013-06-27 11:12:27 -0700 | [diff] [blame] | 178 | LOCAL_SHARED_LIBRARIES += libft2 libpng libz |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 179 | |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 180 | LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libLLVM |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 181 | |
Alex Sakhartchouk | 5bab6bf | 2012-04-10 10:38:39 -0700 | [diff] [blame] | 182 | LOCAL_C_INCLUDES += external/freetype/include |
Shih-wei Liao | 2b2e621 | 2011-01-14 06:21:28 -0800 | [diff] [blame] | 183 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
Hans Boehm | 564e53a | 2014-10-01 16:14:48 -0700 | [diff] [blame] | 184 | |
| 185 | LOCAL_CXX_STL := libc++ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 186 | |
Stephen Hines | ebee948 | 2012-05-09 11:53:24 -0700 | [diff] [blame] | 187 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Stephen Hines | d2d07ac | 2014-08-20 15:46:36 -0700 | [diff] [blame] | 188 | # TODO: external/freetype still uses the register keyword |
| 189 | # Bug: 17163086 |
| 190 | LOCAL_CFLAGS += -Wno-deprecated-register |
Stephen Hines | 6a12181 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 191 | |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 192 | LOCAL_CPPFLAGS += -fno-exceptions |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 193 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 194 | LOCAL_MODULE_TAGS := optional |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 195 | |
| 196 | include $(BUILD_SHARED_LIBRARY) |
| 197 | |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 198 | # Now build a host version for serialization |
| 199 | include $(CLEAR_VARS) |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 200 | LOCAL_MODULE:= libRS |
| 201 | LOCAL_MODULE_TAGS := optional |
Ying Wang | c6a7c1c | 2014-05-20 15:53:43 -0700 | [diff] [blame] | 202 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 203 | LOCAL_IS_HOST_MODULE := true |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 204 | |
Ying Wang | c6a7c1c | 2014-05-20 15:53:43 -0700 | [diff] [blame] | 205 | intermediates := $(call local-generated-sources-dir) |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 206 | |
| 207 | # Generate custom headers |
| 208 | |
| 209 | GEN := $(addprefix $(intermediates)/, \ |
| 210 | rsgApiStructs.h \ |
| 211 | rsgApiFuncDecl.h \ |
| 212 | ) |
| 213 | |
| 214 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
Tim Murray | 2487bb7 | 2013-03-18 16:41:32 -0700 | [diff] [blame] | 215 | $(GEN) : PRIVATE_CUSTOM_TOOL = cat $(PRIVATE_PATH)/rs.spec $(PRIVATE_PATH)/rsg.spec $(PRIVATE_PATH)/rs_native.spec | $(RSG_GENERATOR) $< $@ |
| 216 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec $(LOCAL_PATH)/rsg.spec $(LOCAL_PATH)/rs_native.spec |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 217 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 218 | $(transform-generated-source) |
| 219 | |
| 220 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 221 | |
| 222 | # Generate custom source files |
| 223 | |
| 224 | GEN := $(addprefix $(intermediates)/, \ |
| 225 | rsgApi.cpp \ |
| 226 | rsgApiReplay.cpp \ |
| 227 | ) |
| 228 | |
| 229 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
Tim Murray | 2487bb7 | 2013-03-18 16:41:32 -0700 | [diff] [blame] | 230 | $(GEN) : PRIVATE_CUSTOM_TOOL = cat $(PRIVATE_PATH)/rs.spec $(PRIVATE_PATH)/rsg.spec $(PRIVATE_PATH)/rs_native.spec | $(RSG_GENERATOR) $< $@ |
| 231 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec $(LOCAL_PATH)/rsg.spec $(LOCAL_PATH)/rs_native.spec |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 232 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 233 | $(transform-generated-source) |
| 234 | |
| 235 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 236 | |
Stephen Hines | ebee948 | 2012-05-09 11:53:24 -0700 | [diff] [blame] | 237 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Alex Sakhartchouk | 77d9f4b | 2011-01-31 14:53:24 -0800 | [diff] [blame] | 238 | LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE |
Alex Sakhartchouk | 5bab6bf | 2012-04-10 10:38:39 -0700 | [diff] [blame] | 239 | LOCAL_CFLAGS += -fPIC |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 240 | LOCAL_CPPFLAGS += -fno-exceptions |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 241 | |
| 242 | LOCAL_SRC_FILES:= \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 243 | rsAdapter.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 244 | rsAllocation.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 245 | rsAnimation.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 246 | rsComponent.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 247 | rsContext.cpp \ |
| 248 | rsDevice.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 249 | rsElement.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 250 | rsFBOCache.cpp \ |
| 251 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 252 | rsFileA3D.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 253 | rsFont.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 254 | rsObjectBase.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 255 | rsMatrix2x2.cpp \ |
| 256 | rsMatrix3x3.cpp \ |
| 257 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 258 | rsMesh.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 259 | rsMutex.cpp \ |
Jason Sams | 9e0afb5 | 2011-10-31 13:23:43 -0700 | [diff] [blame] | 260 | rsPath.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 261 | rsProgram.cpp \ |
| 262 | rsProgramFragment.cpp \ |
| 263 | rsProgramStore.cpp \ |
| 264 | rsProgramRaster.cpp \ |
| 265 | rsProgramVertex.cpp \ |
| 266 | rsSampler.cpp \ |
| 267 | rsScript.cpp \ |
| 268 | rsScriptC.cpp \ |
| 269 | rsScriptC_Lib.cpp \ |
| 270 | rsScriptC_LibGL.cpp \ |
Jason Sams | dbe66d6 | 2012-09-17 13:54:41 -0700 | [diff] [blame] | 271 | rsScriptGroup.cpp \ |
Jason Sams | 8eaba4f | 2012-08-14 14:38:05 -0700 | [diff] [blame] | 272 | rsScriptIntrinsic.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 273 | rsSignal.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 274 | rsStream.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 275 | rsThreadIO.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 276 | rsType.cpp |
| 277 | |
Ying Wang | b241181 | 2013-04-09 21:56:34 -0700 | [diff] [blame] | 278 | LOCAL_STATIC_LIBRARIES := libcutils libutils liblog |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 279 | |
Tim Murray | 434098c | 2014-08-13 15:07:40 -0700 | [diff] [blame] | 280 | LOCAL_CLANG := true |
| 281 | |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 282 | include $(BUILD_HOST_STATIC_LIBRARY) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 283 | |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 284 | LLVM_ROOT_PATH := external/llvm |
| 285 | |
| 286 | #============================================================================= |
| 287 | # android librsloader for libbcc (Device) |
| 288 | #----------------------------------------------------------------------------- |
| 289 | |
| 290 | rsloader_SRC_FILES := \ |
Stephen Hines | 6ba6c66 | 2013-07-12 20:16:51 -0700 | [diff] [blame] | 291 | cpu_ref/linkloader/android/librsloader.cpp \ |
| 292 | cpu_ref/linkloader/lib/ELFHeader.cpp \ |
| 293 | cpu_ref/linkloader/lib/ELFSymbol.cpp \ |
| 294 | cpu_ref/linkloader/lib/ELFSectionHeader.cpp \ |
| 295 | cpu_ref/linkloader/lib/ELFTypes.cpp \ |
| 296 | cpu_ref/linkloader/lib/GOT.cpp \ |
| 297 | cpu_ref/linkloader/lib/MemChunk.cpp \ |
| 298 | cpu_ref/linkloader/lib/StubLayout.cpp \ |
| 299 | cpu_ref/linkloader/utils/helper.cpp \ |
| 300 | cpu_ref/linkloader/utils/raw_ostream.cpp \ |
| 301 | cpu_ref/linkloader/utils/rsl_assert.cpp |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 302 | |
| 303 | include $(CLEAR_VARS) |
| 304 | |
| 305 | LOCAL_MODULE := librsloader |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 306 | LOCAL_MODULE_TAGS := optional |
| 307 | |
| 308 | LOCAL_SRC_FILES := $(rsloader_SRC_FILES) |
| 309 | |
| 310 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 311 | |
Hans Boehm | 564e53a | 2014-10-01 16:14:48 -0700 | [diff] [blame] | 312 | LOCAL_CXX_STL := libc++ |
| 313 | |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 314 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 315 | LOCAL_CPPFLAGS += -fno-exceptions |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 316 | |
| 317 | LOCAL_C_INCLUDES := \ |
Stephen Hines | 6ba6c66 | 2013-07-12 20:16:51 -0700 | [diff] [blame] | 318 | $(LOCAL_PATH)/cpu_ref/linkloader \ |
| 319 | $(LOCAL_PATH)/cpu_ref/linkloader/include \ |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 320 | $(LOCAL_C_INCLUDES) |
| 321 | |
| 322 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 323 | include $(BUILD_STATIC_LIBRARY) |
| 324 | |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 325 | #============================================================================= |
| 326 | # android librsloader for libbcc (Host) |
| 327 | #----------------------------------------------------------------------------- |
| 328 | |
| 329 | include $(CLEAR_VARS) |
| 330 | |
| 331 | LOCAL_MODULE := librsloader |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 332 | ifneq ($(HOST_OS),windows) |
Andrew Hsieh | 56345f1 | 2014-05-08 19:59:37 +0800 | [diff] [blame] | 333 | LOCAL_CLANG := true |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 334 | endif |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 335 | |
| 336 | LOCAL_MODULE_TAGS := optional |
| 337 | |
| 338 | LOCAL_SRC_FILES := $(rsloader_SRC_FILES) |
| 339 | |
Raphael Moll | 1033b59 | 2013-07-23 19:03:29 -0700 | [diff] [blame] | 340 | ifdef USE_MINGW |
Stephen Hines | 32d9369 | 2013-08-08 14:27:07 -0700 | [diff] [blame] | 341 | LOCAL_SRC_FILES += cpu_ref/linkloader/lib/mmanWindows.cpp |
Raphael Moll | 1033b59 | 2013-07-23 19:03:29 -0700 | [diff] [blame] | 342 | endif |
| 343 | |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 344 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 345 | |
Hans Boehm | 564e53a | 2014-10-01 16:14:48 -0700 | [diff] [blame] | 346 | LOCAL_CXX_STL := libc++ |
| 347 | |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 348 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
| 349 | LOCAL_CFLAGS += -D__HOST__ |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 350 | LOCAL_CPPFLAGS += -fno-exceptions |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 351 | |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 352 | ifeq ($(HOST_OS),windows) |
| 353 | LOCAL_C_INCLUDES := \ |
| 354 | $(LOCAL_PATH)/cpu_ref/linkloader \ |
| 355 | $(LOCAL_PATH)/cpu_ref/linkloader/include \ |
| 356 | $(LOCAL_C_INCLUDES) |
| 357 | else |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 358 | LOCAL_C_INCLUDES := \ |
Stephen Hines | 6ba6c66 | 2013-07-12 20:16:51 -0700 | [diff] [blame] | 359 | $(LOCAL_PATH)/cpu_ref/linkloader \ |
| 360 | $(LOCAL_PATH)/cpu_ref/linkloader/include \ |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 361 | $(LOCAL_C_INCLUDES) |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 362 | endif |
Stephen Hines | b53c8a5 | 2013-04-05 22:17:36 -0700 | [diff] [blame] | 363 | |
| 364 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 365 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 366 | |
Stephen Hines | f12f8ed | 2013-05-23 13:40:57 -0700 | [diff] [blame] | 367 | include $(call all-makefiles-under,$(LOCAL_PATH)) |