Jason Sams | 8af858e9 | 2009-07-23 16:10:46 -0700 | [diff] [blame] | 1 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 2 | LOCAL_PATH:=$(call my-dir) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 3 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 4 | |
| 5 | # Build rsg-generator ==================== |
| 6 | include $(CLEAR_VARS) |
Jason Sams | d19f10d | 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 | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 15 | intermediates := $(local-intermediates-dir) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 16 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 17 | LOCAL_SRC_FILES:= \ |
Joe Onorato | daed524 | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 18 | spec.l \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 19 | rsg_generator.c |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 20 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 21 | include $(BUILD_HOST_EXECUTABLE) |
| 22 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 23 | # TODO: This should go into build/core/config.mk |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 24 | RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) |
| 25 | |
Shih-wei Liao | 307bf62 | 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 | 067e7b2 | 2011-01-12 19:14:27 -0800 | [diff] [blame] | 30 | |
Shih-wei Liao | 307bf62 | 2011-01-14 04:26:30 -0800 | [diff] [blame] | 31 | # LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Shih-wei Liao | 067e7b2 | 2011-01-12 19:14:27 -0800 | [diff] [blame] | 32 | |
Shih-wei Liao | 307bf62 | 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 | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 36 | |
| 37 | # Build render script lib ==================== |
Marco Nelissen | 3f8f9da8 | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 38 | |
Jason Sams | d19f10d | 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 | d19f10d | 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 | 196ac85 | 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 | d19f10d | 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 | eaff307 | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 57 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 58 | # used in jni/Android.mk |
| 59 | rs_generated_source += $(GEN) |
Jason Sams | d19f10d | 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 | eaff307 | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 68 | |
Jason Sams | 196ac85 | 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 | d19f10d | 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 | eaff307 | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 74 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 75 | # used in jni/Android.mk |
| 76 | rs_generated_source += $(GEN) |
Jason Sams | 196ac85 | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 77 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 78 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 79 | |
| 80 | LOCAL_SRC_FILES:= \ |
| 81 | rsAdapter.cpp \ |
| 82 | rsAllocation.cpp \ |
Jason Sams | f468700 | 2010-03-10 17:30:41 -0800 | [diff] [blame] | 83 | rsAnimation.cpp \ |
Jason Sams | 718cd1f | 2009-12-23 14:35:29 -0800 | [diff] [blame] | 84 | rsComponent.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 85 | rsContext.cpp \ |
| 86 | rsDevice.cpp \ |
| 87 | rsElement.cpp \ |
Alex Sakhartchouk | 8e90f2b | 2011-04-01 14:19:01 -0700 | [diff] [blame] | 88 | rsFBOCache.cpp \ |
Jason Sams | 7a22e10 | 2011-05-06 14:14:30 -0700 | [diff] [blame] | 89 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | 9b949fc | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 90 | rsFileA3D.cpp \ |
| 91 | rsFont.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 92 | rsLocklessFifo.cpp \ |
| 93 | rsObjectBase.cpp \ |
Jason Sams | fcf7231 | 2011-04-20 15:09:01 -0700 | [diff] [blame] | 94 | rsMatrix2x2.cpp \ |
| 95 | rsMatrix3x3.cpp \ |
| 96 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | 9b949fc | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 97 | rsMesh.cpp \ |
| 98 | rsMutex.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 99 | rsProgram.cpp \ |
| 100 | rsProgramFragment.cpp \ |
Jason Sams | 54db59c | 2010-05-13 18:30:11 -0700 | [diff] [blame] | 101 | rsProgramStore.cpp \ |
Jason Sams | ebfb436 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 102 | rsProgramRaster.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 103 | rsProgramVertex.cpp \ |
| 104 | rsSampler.cpp \ |
| 105 | rsScript.cpp \ |
| 106 | rsScriptC.cpp \ |
Jason Sams | c97bb88 | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 107 | rsScriptC_Lib.cpp \ |
Jason Sams | 536923d | 2010-05-18 13:35:45 -0700 | [diff] [blame] | 108 | rsScriptC_LibGL.cpp \ |
Jason Sams | c1d726c | 2010-03-18 11:39:44 -0700 | [diff] [blame] | 109 | rsSignal.cpp \ |
Alex Sakhartchouk | 9b949fc | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 110 | rsStream.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 111 | rsThreadIO.cpp \ |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 112 | rsType.cpp \ |
Jason Sams | 7e8aae7 | 2011-05-26 16:33:01 -0700 | [diff] [blame] | 113 | driver/rsdAllocation.cpp \ |
Jason Sams | e4a06c5 | 2011-03-16 16:29:28 -0700 | [diff] [blame] | 114 | driver/rsdBcc.cpp \ |
Jason Sams | 48f5056 | 2011-03-18 15:03:25 -0700 | [diff] [blame] | 115 | driver/rsdCore.cpp \ |
Alex Sakhartchouk | 2f6964f | 2011-05-13 14:53:34 -0700 | [diff] [blame] | 116 | driver/rsdFrameBuffer.cpp \ |
Alex Sakhartchouk | 8650c32 | 2011-06-16 11:05:13 -0700 | [diff] [blame] | 117 | driver/rsdFrameBufferObj.cpp \ |
Jason Sams | 803626f | 2011-04-06 17:52:23 -0700 | [diff] [blame] | 118 | driver/rsdGL.cpp \ |
Alex Sakhartchouk | 4a36b45 | 2011-04-29 16:49:08 -0700 | [diff] [blame] | 119 | driver/rsdMesh.cpp \ |
| 120 | driver/rsdMeshObj.cpp \ |
| 121 | driver/rsdProgram.cpp \ |
Jason Sams | 331bf9b | 2011-04-06 11:23:54 -0700 | [diff] [blame] | 122 | driver/rsdProgramRaster.cpp \ |
Jason Sams | fcf7231 | 2011-04-20 15:09:01 -0700 | [diff] [blame] | 123 | driver/rsdProgramStore.cpp \ |
| 124 | driver/rsdRuntimeMath.cpp \ |
Alex Sakhartchouk | 4a36b45 | 2011-04-29 16:49:08 -0700 | [diff] [blame] | 125 | driver/rsdRuntimeStubs.cpp \ |
Alex Sakhartchouk | 4385054 | 2011-05-05 16:56:27 -0700 | [diff] [blame] | 126 | driver/rsdSampler.cpp \ |
Alex Sakhartchouk | 4a36b45 | 2011-04-29 16:49:08 -0700 | [diff] [blame] | 127 | driver/rsdShader.cpp \ |
| 128 | driver/rsdShaderCache.cpp \ |
| 129 | driver/rsdVertexArray.cpp |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 130 | |
Stephen Hines | c27d187 | 2011-07-18 17:24:11 -0700 | [diff] [blame] | 131 | LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc libbcinfo |
Alex Sakhartchouk | 9b949fc | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 132 | |
Shih-wei Liao | 3b5379d | 2011-01-14 05:00:37 -0800 | [diff] [blame] | 133 | LOCAL_STATIC_LIBRARIES := libdex libft2 |
Alex Sakhartchouk | 9b949fc | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 134 | |
Shih-wei Liao | eeca435 | 2010-12-20 20:45:56 +0800 | [diff] [blame] | 135 | LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik |
Shih-wei Liao | 076b770 | 2011-01-14 06:21:28 -0800 | [diff] [blame] | 136 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
Alex Sakhartchouk | 9b949fc | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 137 | |
Stephen Hines | 60f9a62 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 138 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
| 139 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 140 | LOCAL_LDLIBS := -lpthread -ldl |
| 141 | LOCAL_MODULE:= libRS |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 142 | LOCAL_MODULE_TAGS := optional |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 143 | |
| 144 | include $(BUILD_SHARED_LIBRARY) |
| 145 | |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 146 | # Now build a host version for serialization |
| 147 | include $(CLEAR_VARS) |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 148 | LOCAL_MODULE:= libRS |
| 149 | LOCAL_MODULE_TAGS := optional |
| 150 | |
| 151 | intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,HOST,) |
| 152 | |
| 153 | # Generate custom headers |
| 154 | |
| 155 | GEN := $(addprefix $(intermediates)/, \ |
| 156 | rsgApiStructs.h \ |
| 157 | rsgApiFuncDecl.h \ |
| 158 | ) |
| 159 | |
| 160 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 161 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
| 162 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 163 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 164 | $(transform-generated-source) |
| 165 | |
| 166 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 167 | |
| 168 | # Generate custom source files |
| 169 | |
| 170 | GEN := $(addprefix $(intermediates)/, \ |
| 171 | rsgApi.cpp \ |
| 172 | rsgApiReplay.cpp \ |
| 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)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 179 | $(transform-generated-source) |
| 180 | |
| 181 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 182 | |
Stephen Hines | 60f9a62 | 2011-03-01 17:34:59 -0800 | [diff] [blame] | 183 | LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable |
Alex Sakhartchouk | d0f5bd1 | 2011-01-31 14:53:24 -0800 | [diff] [blame] | 184 | LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 185 | LOCAL_CFLAGS += -fPIC |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 186 | |
| 187 | LOCAL_SRC_FILES:= \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 188 | rsAdapter.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 189 | rsAllocation.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 190 | rsAnimation.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 191 | rsComponent.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 192 | rsContext.cpp \ |
| 193 | rsDevice.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 194 | rsElement.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 195 | rsFBOCache.cpp \ |
| 196 | rsFifoSocket.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 197 | rsFileA3D.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 198 | rsFont.cpp \ |
| 199 | rsLocklessFifo.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 200 | rsObjectBase.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 201 | rsMatrix2x2.cpp \ |
| 202 | rsMatrix3x3.cpp \ |
| 203 | rsMatrix4x4.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 204 | rsMesh.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 205 | rsMutex.cpp \ |
| 206 | rsProgram.cpp \ |
| 207 | rsProgramFragment.cpp \ |
| 208 | rsProgramStore.cpp \ |
| 209 | rsProgramRaster.cpp \ |
| 210 | rsProgramVertex.cpp \ |
| 211 | rsSampler.cpp \ |
| 212 | rsScript.cpp \ |
| 213 | rsScriptC.cpp \ |
| 214 | rsScriptC_Lib.cpp \ |
| 215 | rsScriptC_LibGL.cpp \ |
| 216 | rsSignal.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 217 | rsStream.cpp \ |
Alex Sakhartchouk | 17a8a19 | 2011-06-03 10:18:01 -0700 | [diff] [blame] | 218 | rsThreadIO.cpp \ |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 219 | rsType.cpp |
| 220 | |
| 221 | LOCAL_STATIC_LIBRARIES := libcutils libutils |
| 222 | |
| 223 | LOCAL_LDLIBS := -lpthread |
Alex Sakhartchouk | a3b5960 | 2011-01-28 09:31:47 -0800 | [diff] [blame] | 224 | |
| 225 | include $(BUILD_HOST_STATIC_LIBRARY) |