blob: a07955ac843d2e4042b363fa6bff84c0a07b3496 [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
Marco Nelissen3f8f9da82009-08-12 09:41:07 -070080# 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.
83ifneq ($(TARGET_SIMULATOR),true)
84
Jason Samsd19f10d2009-05-22 14:03:28 -070085LOCAL_SRC_FILES:= \
86 rsAdapter.cpp \
87 rsAllocation.cpp \
Jason Samsf4687002010-03-10 17:30:41 -080088 rsAnimation.cpp \
Jason Sams718cd1f2009-12-23 14:35:29 -080089 rsComponent.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070090 rsContext.cpp \
91 rsDevice.cpp \
92 rsElement.cpp \
Alex Sakhartchouk8e90f2b2011-04-01 14:19:01 -070093 rsFBOCache.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -070094 rsFileA3D.cpp \
95 rsFont.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070096 rsLocklessFifo.cpp \
97 rsObjectBase.cpp \
98 rsMatrix.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -070099 rsMesh.cpp \
100 rsMutex.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700101 rsProgram.cpp \
102 rsProgramFragment.cpp \
Jason Sams54db59c2010-05-13 18:30:11 -0700103 rsProgramStore.cpp \
Jason Samsebfb4362009-09-23 13:57:02 -0700104 rsProgramRaster.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700105 rsProgramVertex.cpp \
106 rsSampler.cpp \
107 rsScript.cpp \
108 rsScriptC.cpp \
Jason Samsc97bb882009-07-20 14:31:06 -0700109 rsScriptC_Lib.cpp \
Jason Sams536923d2010-05-18 13:35:45 -0700110 rsScriptC_LibCL.cpp \
111 rsScriptC_LibGL.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700112 rsShaderCache.cpp \
Jason Samsc1d726c2010-03-18 11:39:44 -0700113 rsSignal.cpp \
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700114 rsStream.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -0700115 rsThreadIO.cpp \
Jason Samsbb51c402009-11-25 13:22:07 -0800116 rsType.cpp \
Jason Samse4a06c52011-03-16 16:29:28 -0700117 rsVertexArray.cpp \
118 driver/rsdBcc.cpp \
Jason Sams48f50562011-03-18 15:03:25 -0700119 driver/rsdCore.cpp \
120 driver/rsdProgramStore.cpp
Jason Samsd19f10d2009-05-22 14:03:28 -0700121
Jason Samsbb51c402009-11-25 13:22:07 -0800122
Shih-wei Liaoeeca4352010-12-20 20:45:56 +0800123LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700124
Shih-wei Liao3b5379d2011-01-14 05:00:37 -0800125LOCAL_STATIC_LIBRARIES := libdex libft2
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700126
Shih-wei Liaoeeca4352010-12-20 20:45:56 +0800127LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik
Shih-wei Liao076b7702011-01-14 06:21:28 -0800128LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700129
Stephen Hines60f9a622011-03-01 17:34:59 -0800130LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
131
Jason Samsd19f10d2009-05-22 14:03:28 -0700132LOCAL_LDLIBS := -lpthread -ldl
133LOCAL_MODULE:= libRS
Jason Sams94d8e90a2009-06-10 16:09:05 -0700134LOCAL_MODULE_TAGS := optional
Jason Samsd19f10d2009-05-22 14:03:28 -0700135
136include $(BUILD_SHARED_LIBRARY)
137
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800138# Now build a host version for serialization
139include $(CLEAR_VARS)
Stephen Hines60f9a622011-03-01 17:34:59 -0800140LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
Alex Sakhartchoukd0f5bd12011-01-31 14:53:24 -0800141LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800142
143LOCAL_SRC_FILES:= \
144 rsAllocation.cpp \
145 rsComponent.cpp \
146 rsElement.cpp \
147 rsFileA3D.cpp \
148 rsObjectBase.cpp \
149 rsMesh.cpp \
150 rsStream.cpp \
151 rsType.cpp
152
153LOCAL_STATIC_LIBRARIES := libcutils libutils
154
155LOCAL_LDLIBS := -lpthread
156LOCAL_MODULE:= libRSserialize
157LOCAL_MODULE_TAGS := optional
158
159include $(BUILD_HOST_STATIC_LIBRARY)
160
Marco Nelissen3f8f9da82009-08-12 09:41:07 -0700161endif #simulator