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