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 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame^] | 4 | include $(CLEAR_VARS) |
| 5 | LOCAL_MODULE := libRSDriver |
| 6 | |
| 7 | LOCAL_SRC_FILES:= \ |
| 8 | driver/rsdAllocation.cpp \ |
| 9 | driver/rsdBcc.cpp \ |
| 10 | driver/rsdCore.cpp \ |
| 11 | driver/rsdFrameBuffer.cpp \ |
| 12 | driver/rsdFrameBufferObj.cpp \ |
| 13 | driver/rsdGL.cpp \ |
| 14 | driver/rsdMesh.cpp \ |
| 15 | driver/rsdMeshObj.cpp \ |
| 16 | driver/rsdPath.cpp \ |
| 17 | driver/rsdProgram.cpp \ |
| 18 | driver/rsdProgramRaster.cpp \ |
| 19 | driver/rsdProgramStore.cpp \ |
| 20 | driver/rsdRuntimeMath.cpp \ |
| 21 | driver/rsdRuntimeStubs.cpp \ |
| 22 | driver/rsdSampler.cpp \ |
| 23 | driver/rsdShader.cpp \ |
| 24 | driver/rsdShaderCache.cpp \ |
| 25 | driver/rsdVertexArray.cpp |
| 26 | |
| 27 | LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 |
| 28 | LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libgui |
| 29 | |
| 30 | LOCAL_C_INCLUDES += external/zlib dalvik |
| 31 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
| 32 | |
| 33 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
| 34 | |
| 35 | LOCAL_LDLIBS := -lpthread -ldl |
| 36 | LOCAL_MODULE_TAGS := optional |
| 37 | |
| 38 | include $(BUILD_STATIC_LIBRARY) |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 39 | |
| 40 | # Build rsg-generator ==================== |
| 41 | include $(CLEAR_VARS) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 42 | |
| 43 | LOCAL_MODULE := rsg-generator |
| 44 | |
| 45 | # These symbols are normally defined by BUILD_XXX, but we need to define them |
| 46 | # here so that local-intermediates-dir works. |
| 47 | |
| 48 | LOCAL_IS_HOST_MODULE := true |
| 49 | LOCAL_MODULE_CLASS := EXECUTABLES |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 50 | intermediates := $(local-intermediates-dir) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 51 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 52 | LOCAL_SRC_FILES:= \ |
Joe Onorato | 84614dd | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 53 | spec.l \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 54 | rsg_generator.c |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 55 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 56 | include $(BUILD_HOST_EXECUTABLE) |
| 57 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 58 | # TODO: This should go into build/core/config.mk |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 59 | RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) |
| 60 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 61 | include $(CLEAR_VARS) |
| 62 | LOCAL_MODULE := libRS |
| 63 | |
| 64 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 65 | intermediates:= $(local-intermediates-dir) |
| 66 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 67 | # Generate custom headers |
| 68 | |
| 69 | GEN := $(addprefix $(intermediates)/, \ |
| 70 | rsgApiStructs.h \ |
| 71 | rsgApiFuncDecl.h \ |
| 72 | ) |
| 73 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 74 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 75 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 76 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 77 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 78 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 79 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 80 | # used in jni/Android.mk |
| 81 | rs_generated_source += $(GEN) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 82 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 83 | |
| 84 | # Generate custom source files |
| 85 | |
| 86 | GEN := $(addprefix $(intermediates)/, \ |
| 87 | rsgApi.cpp \ |
| 88 | rsgApiReplay.cpp \ |
| 89 | ) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 90 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 91 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 92 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 93 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 94 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 95 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 96 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 97 | # used in jni/Android.mk |
| 98 | rs_generated_source += $(GEN) |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 99 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 100 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 101 | |
| 102 | LOCAL_SRC_FILES:= \ |
| 103 | rsAdapter.cpp \ |
| 104 | rsAllocation.cpp \ |
Jason Sams | c1ed589 | 2010-03-10 17:30:41 -0800 | [diff] [blame] | 105 | rsAnimation.cpp \ |
Jason Sams | d01d970 | 2009-12-23 14:35:29 -0800 | [diff] [blame] | 106 | rsComponent.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 107 | rsContext.cpp \ |
| 108 | rsDevice.cpp \ |
| 109 | rsElement.cpp \ |
Alex Sakhartchouk | 7d9c5ff | 2011-04-01 14:19:01 -0700 | [diff] [blame] | 110 | rsFBOCache.cpp \ |
Jason Sams | 2008747 | 2011-05-06 14:14:30 -0700 | [diff] [blame] | 111 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 112 | rsFileA3D.cpp \ |
| 113 | rsFont.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 114 | rsObjectBase.cpp \ |
Jason Sams | 87fe59a | 2011-04-20 15:09:01 -0700 | [diff] [blame] | 115 | rsMatrix2x2.cpp \ |
| 116 | rsMatrix3x3.cpp \ |
| 117 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 118 | rsMesh.cpp \ |
| 119 | rsMutex.cpp \ |
Jason Sams | 9e0afb5 | 2011-10-31 13:23:43 -0700 | [diff] [blame] | 120 | rsPath.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 121 | rsProgram.cpp \ |
| 122 | rsProgramFragment.cpp \ |
Jason Sams | ccc010b | 2010-05-13 18:30:11 -0700 | [diff] [blame] | 123 | rsProgramStore.cpp \ |
Jason Sams | 5fd09d8 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 124 | rsProgramRaster.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 125 | rsProgramVertex.cpp \ |
| 126 | rsSampler.cpp \ |
| 127 | rsScript.cpp \ |
| 128 | rsScriptC.cpp \ |
Jason Sams | e45ac6e | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 129 | rsScriptC_Lib.cpp \ |
Jason Sams | aeb094b | 2010-05-18 13:35:45 -0700 | [diff] [blame] | 130 | rsScriptC_LibGL.cpp \ |
Jason Sams | 12b14ae | 2010-03-18 11:39:44 -0700 | [diff] [blame] | 131 | rsSignal.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 132 | rsStream.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 133 | rsThreadIO.cpp \ |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 134 | rsType.cpp \ |
Jason Sams | 221a4b1 | 2012-02-22 15:22:41 -0800 | [diff] [blame] | 135 | RenderScript.cpp \ |
| 136 | BaseObj.cpp \ |
| 137 | Element.cpp \ |
| 138 | Type.cpp \ |
Jason Sams | b2e3dc5 | 2012-02-23 17:14:39 -0800 | [diff] [blame] | 139 | Allocation.cpp \ |
| 140 | Script.cpp \ |
| 141 | ScriptC.cpp |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 142 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame^] | 143 | LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libbcc |
| 144 | LOCAL_SHARED_LIBRARIES += libui libbcinfo libgui |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 145 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame^] | 146 | LOCAL_STATIC_LIBRARIES := libdex libft2 libRSDriver |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 147 | |
Shih-wei Liao | ce8a079 | 2010-12-20 20:45:56 +0800 | [diff] [blame] | 148 | LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik |
Shih-wei Liao | 2b2e621 | 2011-01-14 06:21:28 -0800 | [diff] [blame] | 149 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 150 | |
Stephen Hines | 6a12181 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 151 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
| 152 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 153 | LOCAL_LDLIBS := -lpthread -ldl |
| 154 | LOCAL_MODULE:= libRS |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 155 | LOCAL_MODULE_TAGS := optional |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 156 | |
| 157 | include $(BUILD_SHARED_LIBRARY) |
| 158 | |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 159 | # Now build a host version for serialization |
| 160 | include $(CLEAR_VARS) |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 161 | LOCAL_MODULE:= libRS |
| 162 | LOCAL_MODULE_TAGS := optional |
| 163 | |
| 164 | intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,HOST,) |
| 165 | |
| 166 | # Generate custom headers |
| 167 | |
| 168 | GEN := $(addprefix $(intermediates)/, \ |
| 169 | rsgApiStructs.h \ |
| 170 | rsgApiFuncDecl.h \ |
| 171 | ) |
| 172 | |
| 173 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 174 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
| 175 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 176 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 177 | $(transform-generated-source) |
| 178 | |
| 179 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 180 | |
| 181 | # Generate custom source files |
| 182 | |
| 183 | GEN := $(addprefix $(intermediates)/, \ |
| 184 | rsgApi.cpp \ |
| 185 | rsgApiReplay.cpp \ |
| 186 | ) |
| 187 | |
| 188 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 189 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
| 190 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 191 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 192 | $(transform-generated-source) |
| 193 | |
| 194 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 195 | |
Stephen Hines | 6a12181 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 196 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
Alex Sakhartchouk | 77d9f4b | 2011-01-31 14:53:24 -0800 | [diff] [blame] | 197 | LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 198 | LOCAL_CFLAGS += -fPIC |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 199 | |
| 200 | LOCAL_SRC_FILES:= \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 201 | rsAdapter.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 202 | rsAllocation.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 203 | rsAnimation.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 204 | rsComponent.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 205 | rsContext.cpp \ |
| 206 | rsDevice.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 207 | rsElement.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 208 | rsFBOCache.cpp \ |
| 209 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 210 | rsFileA3D.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 211 | rsFont.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 212 | rsObjectBase.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 213 | rsMatrix2x2.cpp \ |
| 214 | rsMatrix3x3.cpp \ |
| 215 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 216 | rsMesh.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 217 | rsMutex.cpp \ |
Jason Sams | 9e0afb5 | 2011-10-31 13:23:43 -0700 | [diff] [blame] | 218 | rsPath.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 219 | rsProgram.cpp \ |
| 220 | rsProgramFragment.cpp \ |
| 221 | rsProgramStore.cpp \ |
| 222 | rsProgramRaster.cpp \ |
| 223 | rsProgramVertex.cpp \ |
| 224 | rsSampler.cpp \ |
| 225 | rsScript.cpp \ |
| 226 | rsScriptC.cpp \ |
| 227 | rsScriptC_Lib.cpp \ |
| 228 | rsScriptC_LibGL.cpp \ |
| 229 | rsSignal.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 230 | rsStream.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 231 | rsThreadIO.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 232 | rsType.cpp |
| 233 | |
| 234 | LOCAL_STATIC_LIBRARIES := libcutils libutils |
| 235 | |
| 236 | LOCAL_LDLIBS := -lpthread |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 237 | |
| 238 | include $(BUILD_HOST_STATIC_LIBRARY) |