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