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