blob: 7f0cbeb258c0e5027beda3f4e459a20e3ed098de [file] [log] [blame]
Jason Sams8af858e92009-07-23 16:10:46 -07001
Jason Sams94d8e90a2009-06-10 16:09:05 -07002LOCAL_PATH:=$(call my-dir)
Jason Samsd19f10d2009-05-22 14:03:28 -07003
Jason Sams94d8e90a2009-06-10 16:09:05 -07004
5# Build rsg-generator ====================
6include $(CLEAR_VARS)
Jason Samsd19f10d2009-05-22 14:03:28 -07007
8LOCAL_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
13LOCAL_IS_HOST_MODULE := true
14LOCAL_MODULE_CLASS := EXECUTABLES
Jason Sams94d8e90a2009-06-10 16:09:05 -070015intermediates := $(local-intermediates-dir)
Jason Samsd19f10d2009-05-22 14:03:28 -070016
Jason Samsd19f10d2009-05-22 14:03:28 -070017LOCAL_SRC_FILES:= \
Joe Onoratodaed5242009-08-10 15:01:51 -070018 spec.l \
Jason Samsd19f10d2009-05-22 14:03:28 -070019 rsg_generator.c
Jason Sams94d8e90a2009-06-10 16:09:05 -070020
Jason Samsd19f10d2009-05-22 14:03:28 -070021include $(BUILD_HOST_EXECUTABLE)
22
Jason Sams94d8e90a2009-06-10 16:09:05 -070023# TODO: This should go into build/core/config.mk
Jason Samsd19f10d2009-05-22 14:03:28 -070024RSG_GENERATOR:=$(LOCAL_BUILT_MODULE)
25
Shih-wei Liao307bf622011-01-14 04:26:30 -080026# 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 Liao067e7b22011-01-12 19:14:27 -080030
Shih-wei Liao307bf622011-01-14 04:26:30 -080031# LOCAL_MODULE_CLASS := STATIC_LIBRARIES
Shih-wei Liao067e7b22011-01-12 19:14:27 -080032
Shih-wei Liao307bf622011-01-14 04:26:30 -080033# LOCAL_MODULE_TAGS := optional
34# include frameworks/compile/slang/SlangData.mk
35# include $(BUILD_STATIC_LIBRARY)
Jason Sams94d8e90a2009-06-10 16:09:05 -070036
37# Build render script lib ====================
Marco Nelissen3f8f9da82009-08-12 09:41:07 -070038
Jason Samsd19f10d2009-05-22 14:03:28 -070039include $(CLEAR_VARS)
40LOCAL_MODULE := libRS
41
42LOCAL_MODULE_CLASS := SHARED_LIBRARIES
43intermediates:= $(local-intermediates-dir)
44
Jason Samsd19f10d2009-05-22 14:03:28 -070045# Generate custom headers
46
47GEN := $(addprefix $(intermediates)/, \
48 rsgApiStructs.h \
49 rsgApiFuncDecl.h \
50 )
51
Jason Sams196ac852009-06-10 18:35:42 -070052$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
53$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
Jason Samsd19f10d2009-05-22 14:03:28 -070054$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
55$(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg
56 $(transform-generated-source)
Jack Palevicheaff3072009-05-26 17:23:34 -070057
Jason Sams94d8e90a2009-06-10 16:09:05 -070058# used in jni/Android.mk
59rs_generated_source += $(GEN)
Jason Samsd19f10d2009-05-22 14:03:28 -070060LOCAL_GENERATED_SOURCES += $(GEN)
61
62# Generate custom source files
63
64GEN := $(addprefix $(intermediates)/, \
65 rsgApi.cpp \
66 rsgApiReplay.cpp \
67 )
Jack Palevicheaff3072009-05-26 17:23:34 -070068
Jason Sams196ac852009-06-10 18:35:42 -070069$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
70$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
Jason Samsd19f10d2009-05-22 14:03:28 -070071$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
72$(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg
73 $(transform-generated-source)
Jack Palevicheaff3072009-05-26 17:23:34 -070074
Jason Sams94d8e90a2009-06-10 16:09:05 -070075# used in jni/Android.mk
76rs_generated_source += $(GEN)
Jason Sams196ac852009-06-10 18:35:42 -070077
Jason Samsd19f10d2009-05-22 14:03:28 -070078LOCAL_GENERATED_SOURCES += $(GEN)
79
80LOCAL_SRC_FILES:= \
81 rsAdapter.cpp \
82 rsAllocation.cpp \
Jason Samsf4687002010-03-10 17:30:41 -080083 rsAnimation.cpp \
Jason Sams718cd1f2009-12-23 14:35:29 -080084 rsComponent.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070085 rsContext.cpp \
86 rsDevice.cpp \
87 rsElement.cpp \
Alex Sakhartchouk8e90f2b2011-04-01 14:19:01 -070088 rsFBOCache.cpp \
Jason Sams7a22e102011-05-06 14:14:30 -070089 rsFifoSocket.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -070090 rsFileA3D.cpp \
91 rsFont.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070092 rsLocklessFifo.cpp \
93 rsObjectBase.cpp \
Jason Samsfcf72312011-04-20 15:09:01 -070094 rsMatrix2x2.cpp \
95 rsMatrix3x3.cpp \
96 rsMatrix4x4.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -070097 rsMesh.cpp \
98 rsMutex.cpp \
Jason Samsf15ed012011-10-31 13:23:43 -070099 rsPath.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700100 rsProgram.cpp \
101 rsProgramFragment.cpp \
Jason Sams54db59c2010-05-13 18:30:11 -0700102 rsProgramStore.cpp \
Jason Samsebfb4362009-09-23 13:57:02 -0700103 rsProgramRaster.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700104 rsProgramVertex.cpp \
105 rsSampler.cpp \
106 rsScript.cpp \
107 rsScriptC.cpp \
Jason Samsc97bb882009-07-20 14:31:06 -0700108 rsScriptC_Lib.cpp \
Jason Sams536923d2010-05-18 13:35:45 -0700109 rsScriptC_LibGL.cpp \
Jason Samsc1d726c2010-03-18 11:39:44 -0700110 rsSignal.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700111 rsStream.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700112 rsThreadIO.cpp \
Jason Samsbb51c402009-11-25 13:22:07 -0800113 rsType.cpp \
Jason Sams7e8aae72011-05-26 16:33:01 -0700114 driver/rsdAllocation.cpp \
Jason Samse4a06c52011-03-16 16:29:28 -0700115 driver/rsdBcc.cpp \
Jason Sams48f50562011-03-18 15:03:25 -0700116 driver/rsdCore.cpp \
Alex Sakhartchouk2f6964f2011-05-13 14:53:34 -0700117 driver/rsdFrameBuffer.cpp \
Alex Sakhartchouk8650c322011-06-16 11:05:13 -0700118 driver/rsdFrameBufferObj.cpp \
Jason Sams803626f2011-04-06 17:52:23 -0700119 driver/rsdGL.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700120 driver/rsdMesh.cpp \
121 driver/rsdMeshObj.cpp \
Jason Samsf15ed012011-10-31 13:23:43 -0700122 driver/rsdPath.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700123 driver/rsdProgram.cpp \
Jason Sams331bf9b2011-04-06 11:23:54 -0700124 driver/rsdProgramRaster.cpp \
Jason Samsfcf72312011-04-20 15:09:01 -0700125 driver/rsdProgramStore.cpp \
126 driver/rsdRuntimeMath.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700127 driver/rsdRuntimeStubs.cpp \
Alex Sakhartchouk43850542011-05-05 16:56:27 -0700128 driver/rsdSampler.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700129 driver/rsdShader.cpp \
130 driver/rsdShaderCache.cpp \
131 driver/rsdVertexArray.cpp
Jason Samsbb51c402009-11-25 13:22:07 -0800132
Stephen Hinesc27d1872011-07-18 17:24:11 -0700133LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc libbcinfo
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700134
Shih-wei Liao3b5379d2011-01-14 05:00:37 -0800135LOCAL_STATIC_LIBRARIES := libdex libft2
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700136
Shih-wei Liaoeeca4352010-12-20 20:45:56 +0800137LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik
Shih-wei Liao076b7702011-01-14 06:21:28 -0800138LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700139
Stephen Hines60f9a622011-03-01 17:34:59 -0800140LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
141
Jason Samsd19f10d2009-05-22 14:03:28 -0700142LOCAL_LDLIBS := -lpthread -ldl
143LOCAL_MODULE:= libRS
Jason Sams94d8e90a2009-06-10 16:09:05 -0700144LOCAL_MODULE_TAGS := optional
Jason Samsd19f10d2009-05-22 14:03:28 -0700145
146include $(BUILD_SHARED_LIBRARY)
147
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800148# Now build a host version for serialization
149include $(CLEAR_VARS)
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700150LOCAL_MODULE:= libRS
151LOCAL_MODULE_TAGS := optional
152
153intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,HOST,)
154
155# Generate custom headers
156
157GEN := $(addprefix $(intermediates)/, \
158 rsgApiStructs.h \
159 rsgApiFuncDecl.h \
160 )
161
162$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
163$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
164$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
165$(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg
166 $(transform-generated-source)
167
168LOCAL_GENERATED_SOURCES += $(GEN)
169
170# Generate custom source files
171
172GEN := $(addprefix $(intermediates)/, \
173 rsgApi.cpp \
174 rsgApiReplay.cpp \
175 )
176
177$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
178$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
179$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
180$(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg
181 $(transform-generated-source)
182
183LOCAL_GENERATED_SOURCES += $(GEN)
184
Stephen Hines60f9a622011-03-01 17:34:59 -0800185LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
Alex Sakhartchoukd0f5bd12011-01-31 14:53:24 -0800186LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700187LOCAL_CFLAGS += -fPIC
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800188
189LOCAL_SRC_FILES:= \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700190 rsAdapter.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800191 rsAllocation.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700192 rsAnimation.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800193 rsComponent.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700194 rsContext.cpp \
195 rsDevice.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800196 rsElement.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700197 rsFBOCache.cpp \
198 rsFifoSocket.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800199 rsFileA3D.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700200 rsFont.cpp \
201 rsLocklessFifo.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800202 rsObjectBase.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700203 rsMatrix2x2.cpp \
204 rsMatrix3x3.cpp \
205 rsMatrix4x4.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800206 rsMesh.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700207 rsMutex.cpp \
Jason Samsf15ed012011-10-31 13:23:43 -0700208 rsPath.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700209 rsProgram.cpp \
210 rsProgramFragment.cpp \
211 rsProgramStore.cpp \
212 rsProgramRaster.cpp \
213 rsProgramVertex.cpp \
214 rsSampler.cpp \
215 rsScript.cpp \
216 rsScriptC.cpp \
217 rsScriptC_Lib.cpp \
218 rsScriptC_LibGL.cpp \
219 rsSignal.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800220 rsStream.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700221 rsThreadIO.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800222 rsType.cpp
223
224LOCAL_STATIC_LIBRARIES := libcutils libutils
225
226LOCAL_LDLIBS := -lpthread
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800227
228include $(BUILD_HOST_STATIC_LIBRARY)