blob: 58d3e5c3bd09b4b86884084c17e739a6b89ba0f4 [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 Samsd19f10d2009-05-22 14:03:28 -070099 rsProgram.cpp \
100 rsProgramFragment.cpp \
Jason Sams54db59c2010-05-13 18:30:11 -0700101 rsProgramStore.cpp \
Jason Samsebfb4362009-09-23 13:57:02 -0700102 rsProgramRaster.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700103 rsProgramVertex.cpp \
104 rsSampler.cpp \
105 rsScript.cpp \
106 rsScriptC.cpp \
Jason Samsc97bb882009-07-20 14:31:06 -0700107 rsScriptC_Lib.cpp \
Jason Sams536923d2010-05-18 13:35:45 -0700108 rsScriptC_LibGL.cpp \
Jason Samsc1d726c2010-03-18 11:39:44 -0700109 rsSignal.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700110 rsStream.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700111 rsThreadIO.cpp \
Jason Samsbb51c402009-11-25 13:22:07 -0800112 rsType.cpp \
Jason Sams7e8aae72011-05-26 16:33:01 -0700113 driver/rsdAllocation.cpp \
Jason Samse4a06c52011-03-16 16:29:28 -0700114 driver/rsdBcc.cpp \
Jason Sams48f50562011-03-18 15:03:25 -0700115 driver/rsdCore.cpp \
Alex Sakhartchouk2f6964f2011-05-13 14:53:34 -0700116 driver/rsdFrameBuffer.cpp \
Alex Sakhartchouk8650c322011-06-16 11:05:13 -0700117 driver/rsdFrameBufferObj.cpp \
Jason Sams803626f2011-04-06 17:52:23 -0700118 driver/rsdGL.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700119 driver/rsdMesh.cpp \
120 driver/rsdMeshObj.cpp \
121 driver/rsdProgram.cpp \
Jason Sams331bf9b2011-04-06 11:23:54 -0700122 driver/rsdProgramRaster.cpp \
Jason Samsfcf72312011-04-20 15:09:01 -0700123 driver/rsdProgramStore.cpp \
124 driver/rsdRuntimeMath.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700125 driver/rsdRuntimeStubs.cpp \
Alex Sakhartchouk43850542011-05-05 16:56:27 -0700126 driver/rsdSampler.cpp \
Alex Sakhartchouk4a36b452011-04-29 16:49:08 -0700127 driver/rsdShader.cpp \
128 driver/rsdShaderCache.cpp \
129 driver/rsdVertexArray.cpp
Jason Samsbb51c402009-11-25 13:22:07 -0800130
Stephen Hinesc27d1872011-07-18 17:24:11 -0700131LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc libbcinfo
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700132
Shih-wei Liao3b5379d2011-01-14 05:00:37 -0800133LOCAL_STATIC_LIBRARIES := libdex libft2
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700134
Shih-wei Liaoeeca4352010-12-20 20:45:56 +0800135LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik
Shih-wei Liao076b7702011-01-14 06:21:28 -0800136LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700137
Stephen Hines60f9a622011-03-01 17:34:59 -0800138LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
139
Jason Samsd19f10d2009-05-22 14:03:28 -0700140LOCAL_LDLIBS := -lpthread -ldl
141LOCAL_MODULE:= libRS
Jason Sams94d8e90a2009-06-10 16:09:05 -0700142LOCAL_MODULE_TAGS := optional
Jason Samsd19f10d2009-05-22 14:03:28 -0700143
144include $(BUILD_SHARED_LIBRARY)
145
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800146# Now build a host version for serialization
147include $(CLEAR_VARS)
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700148LOCAL_MODULE:= libRS
149LOCAL_MODULE_TAGS := optional
150
151intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,HOST,)
152
153# Generate custom headers
154
155GEN := $(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
166LOCAL_GENERATED_SOURCES += $(GEN)
167
168# Generate custom source files
169
170GEN := $(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
181LOCAL_GENERATED_SOURCES += $(GEN)
182
Stephen Hines60f9a622011-03-01 17:34:59 -0800183LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
Alex Sakhartchoukd0f5bd12011-01-31 14:53:24 -0800184LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700185LOCAL_CFLAGS += -fPIC
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800186
187LOCAL_SRC_FILES:= \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700188 rsAdapter.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800189 rsAllocation.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700190 rsAnimation.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800191 rsComponent.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700192 rsContext.cpp \
193 rsDevice.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800194 rsElement.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700195 rsFBOCache.cpp \
196 rsFifoSocket.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800197 rsFileA3D.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700198 rsFont.cpp \
199 rsLocklessFifo.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800200 rsObjectBase.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700201 rsMatrix2x2.cpp \
202 rsMatrix3x3.cpp \
203 rsMatrix4x4.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800204 rsMesh.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700205 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 Sakhartchouka3b59602011-01-28 09:31:47 -0800217 rsStream.cpp \
Alex Sakhartchouk17a8a192011-06-03 10:18:01 -0700218 rsThreadIO.cpp \
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800219 rsType.cpp
220
221LOCAL_STATIC_LIBRARIES := libcutils libutils
222
223LOCAL_LDLIBS := -lpthread
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800224
225include $(BUILD_HOST_STATIC_LIBRARY)