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