blob: 083688771dac6b49fcbae8843c9ee37f9fda4a8c [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_PRELINK_MODULE := false
32# LOCAL_MODULE_CLASS := STATIC_LIBRARIES
Shih-wei Liao067e7b22011-01-12 19:14:27 -080033
Shih-wei Liao307bf622011-01-14 04:26:30 -080034# LOCAL_MODULE_TAGS := optional
35# include frameworks/compile/slang/SlangData.mk
36# include $(BUILD_STATIC_LIBRARY)
Jason Sams94d8e90a2009-06-10 16:09:05 -070037
38# Build render script lib ====================
Marco Nelissen3f8f9da82009-08-12 09:41:07 -070039
Jason Samsd19f10d2009-05-22 14:03:28 -070040include $(CLEAR_VARS)
41LOCAL_MODULE := libRS
42
43LOCAL_MODULE_CLASS := SHARED_LIBRARIES
44intermediates:= $(local-intermediates-dir)
45
Jason Samsd19f10d2009-05-22 14:03:28 -070046# Generate custom headers
47
48GEN := $(addprefix $(intermediates)/, \
49 rsgApiStructs.h \
50 rsgApiFuncDecl.h \
51 )
52
Jason Sams196ac852009-06-10 18:35:42 -070053$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
54$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
Jason Samsd19f10d2009-05-22 14:03:28 -070055$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
56$(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg
57 $(transform-generated-source)
Jack Palevicheaff3072009-05-26 17:23:34 -070058
Jason Sams94d8e90a2009-06-10 16:09:05 -070059# used in jni/Android.mk
60rs_generated_source += $(GEN)
Jason Samsd19f10d2009-05-22 14:03:28 -070061LOCAL_GENERATED_SOURCES += $(GEN)
62
63# Generate custom source files
64
65GEN := $(addprefix $(intermediates)/, \
66 rsgApi.cpp \
67 rsgApiReplay.cpp \
68 )
Jack Palevicheaff3072009-05-26 17:23:34 -070069
Jason Sams196ac852009-06-10 18:35:42 -070070$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
71$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec
Jason Samsd19f10d2009-05-22 14:03:28 -070072$(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec
73$(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg
74 $(transform-generated-source)
Jack Palevicheaff3072009-05-26 17:23:34 -070075
Jason Sams94d8e90a2009-06-10 16:09:05 -070076# used in jni/Android.mk
77rs_generated_source += $(GEN)
Jason Sams196ac852009-06-10 18:35:42 -070078
Jason Samsd19f10d2009-05-22 14:03:28 -070079LOCAL_GENERATED_SOURCES += $(GEN)
80
Marco Nelissen3f8f9da82009-08-12 09:41:07 -070081# libRS needs libacc, which isn't 64-bit clean, and so can't be built
82# for the simulator on gHardy, and therefore libRS needs to be excluded
83# from the simulator as well.
84ifneq ($(TARGET_SIMULATOR),true)
85
Jason Samsd19f10d2009-05-22 14:03:28 -070086LOCAL_SRC_FILES:= \
87 rsAdapter.cpp \
88 rsAllocation.cpp \
Jason Samsf4687002010-03-10 17:30:41 -080089 rsAnimation.cpp \
Jason Sams718cd1f2009-12-23 14:35:29 -080090 rsComponent.cpp \
Jason Samsd19f10d2009-05-22 14:03:28 -070091 rsContext.cpp \
92 rsDevice.cpp \
93 rsElement.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 \
117 rsVertexArray.cpp
Jason Samsd19f10d2009-05-22 14:03:28 -0700118
Jason Samsbb51c402009-11-25 13:22:07 -0800119
Shih-wei Liaoeeca4352010-12-20 20:45:56 +0800120LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700121
Shih-wei Liao3b5379d2011-01-14 05:00:37 -0800122LOCAL_STATIC_LIBRARIES := libdex libft2
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700123
Shih-wei Liaoeeca4352010-12-20 20:45:56 +0800124LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik
Shih-wei Liao076b7702011-01-14 06:21:28 -0800125LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
Alex Sakhartchouk9b949fc2010-06-24 17:15:34 -0700126
Stephen Hines1bf1f8d2011-03-01 17:34:59 -0800127LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
128
Jason Samsd19f10d2009-05-22 14:03:28 -0700129LOCAL_LDLIBS := -lpthread -ldl
130LOCAL_MODULE:= libRS
Jason Sams94d8e90a2009-06-10 16:09:05 -0700131LOCAL_MODULE_TAGS := optional
Jason Samsd19f10d2009-05-22 14:03:28 -0700132
133include $(BUILD_SHARED_LIBRARY)
134
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800135# Now build a host version for serialization
136include $(CLEAR_VARS)
Stephen Hines1bf1f8d2011-03-01 17:34:59 -0800137LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
Alex Sakhartchoukd0f5bd12011-01-31 14:53:24 -0800138LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE
Alex Sakhartchouka3b59602011-01-28 09:31:47 -0800139
140LOCAL_SRC_FILES:= \
141 rsAllocation.cpp \
142 rsComponent.cpp \
143 rsElement.cpp \
144 rsFileA3D.cpp \
145 rsObjectBase.cpp \
146 rsMesh.cpp \
147 rsStream.cpp \
148 rsType.cpp
149
150LOCAL_STATIC_LIBRARIES := libcutils libutils
151
152LOCAL_LDLIBS := -lpthread
153LOCAL_MODULE:= libRSserialize
154LOCAL_MODULE_TAGS := optional
155
156include $(BUILD_HOST_STATIC_LIBRARY)
157
Marco Nelissen3f8f9da82009-08-12 09:41:07 -0700158endif #simulator