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