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 | |
Jason Sams | a6ab26a | 2012-03-28 17:44:21 -0700 | [diff] [blame] | 30 | LOCAL_C_INCLUDES += external/zlib |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 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 | a662edd | 2012-04-02 15:00:10 -0700 | [diff] [blame^] | 134 | rsType.cpp |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 135 | |
Alex Sakhartchouk | 5e3c968 | 2012-03-09 15:04:23 -0800 | [diff] [blame] | 136 | LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libbcc |
| 137 | LOCAL_SHARED_LIBRARIES += libui libbcinfo libgui |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 138 | |
Brian Swetland | e8c095f | 2012-03-28 18:17:16 -0700 | [diff] [blame] | 139 | LOCAL_STATIC_LIBRARIES := libft2 libRSDriver |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 140 | |
Jason Sams | a6ab26a | 2012-03-28 17:44:21 -0700 | [diff] [blame] | 141 | LOCAL_C_INCLUDES += external/freetype/include external/zlib |
Shih-wei Liao | 2b2e621 | 2011-01-14 06:21:28 -0800 | [diff] [blame] | 142 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 143 | |
Stephen Hines | 6a12181 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 144 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
Brian Swetland | e8c095f | 2012-03-28 18:17:16 -0700 | [diff] [blame] | 145 | ifeq ($(TARGET_BUILD_PDK), true) |
| 146 | LOCAL_CFLAGS += -D__RS_PDK__ |
| 147 | endif |
Stephen Hines | 6a12181 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 148 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 149 | LOCAL_LDLIBS := -lpthread -ldl |
| 150 | LOCAL_MODULE:= libRS |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 151 | LOCAL_MODULE_TAGS := optional |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 152 | |
| 153 | include $(BUILD_SHARED_LIBRARY) |
| 154 | |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 155 | # Now build a host version for serialization |
| 156 | include $(CLEAR_VARS) |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 157 | LOCAL_MODULE:= libRS |
| 158 | LOCAL_MODULE_TAGS := optional |
| 159 | |
| 160 | intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,HOST,) |
| 161 | |
| 162 | # Generate custom headers |
| 163 | |
| 164 | GEN := $(addprefix $(intermediates)/, \ |
| 165 | rsgApiStructs.h \ |
| 166 | rsgApiFuncDecl.h \ |
| 167 | ) |
| 168 | |
| 169 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 170 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
| 171 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 172 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 173 | $(transform-generated-source) |
| 174 | |
| 175 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 176 | |
| 177 | # Generate custom source files |
| 178 | |
| 179 | GEN := $(addprefix $(intermediates)/, \ |
| 180 | rsgApi.cpp \ |
| 181 | rsgApiReplay.cpp \ |
| 182 | ) |
| 183 | |
| 184 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 185 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
| 186 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 187 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 188 | $(transform-generated-source) |
| 189 | |
| 190 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 191 | |
Stephen Hines | 6a12181 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 192 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
Alex Sakhartchouk | 77d9f4b | 2011-01-31 14:53:24 -0800 | [diff] [blame] | 193 | LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE |
Brian Swetland | e8c095f | 2012-03-28 18:17:16 -0700 | [diff] [blame] | 194 | LOCAL_CFLAGS += -fPIC |
Jason Sams | a08c06f | 2012-03-28 17:54:19 -0700 | [diff] [blame] | 195 | ifeq ($(TARGET_BUILD_PDK), true) |
Jason Sams | a6ab26a | 2012-03-28 17:44:21 -0700 | [diff] [blame] | 196 | LOCAL_CFLAGS += -D__RS_PDK__ |
| 197 | endif |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 198 | |
| 199 | LOCAL_SRC_FILES:= \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 200 | rsAdapter.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 201 | rsAllocation.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 202 | rsAnimation.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 203 | rsComponent.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 204 | rsContext.cpp \ |
| 205 | rsDevice.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 206 | rsElement.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 207 | rsFBOCache.cpp \ |
| 208 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 209 | rsFileA3D.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 210 | rsFont.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 211 | rsObjectBase.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 212 | rsMatrix2x2.cpp \ |
| 213 | rsMatrix3x3.cpp \ |
| 214 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 215 | rsMesh.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 216 | rsMutex.cpp \ |
Jason Sams | 9e0afb5 | 2011-10-31 13:23:43 -0700 | [diff] [blame] | 217 | rsPath.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 218 | rsProgram.cpp \ |
| 219 | rsProgramFragment.cpp \ |
| 220 | rsProgramStore.cpp \ |
| 221 | rsProgramRaster.cpp \ |
| 222 | rsProgramVertex.cpp \ |
| 223 | rsSampler.cpp \ |
| 224 | rsScript.cpp \ |
| 225 | rsScriptC.cpp \ |
| 226 | rsScriptC_Lib.cpp \ |
| 227 | rsScriptC_LibGL.cpp \ |
| 228 | rsSignal.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 229 | rsStream.cpp \ |
Alex Sakhartchouk | b81a0eb | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 230 | rsThreadIO.cpp \ |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 231 | rsType.cpp |
| 232 | |
| 233 | LOCAL_STATIC_LIBRARIES := libcutils libutils |
| 234 | |
| 235 | LOCAL_LDLIBS := -lpthread |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 236 | |
| 237 | include $(BUILD_HOST_STATIC_LIBRARY) |