Jason Sams | 5e172b0 | 2009-07-23 16:10:46 -0700 | [diff] [blame] | 1 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 2 | LOCAL_PATH:=$(call my-dir) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 3 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 4 | |
| 5 | # Build rsg-generator ==================== |
| 6 | include $(CLEAR_VARS) |
Jason Sams | 326e0dd | 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 | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 15 | intermediates := $(local-intermediates-dir) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 16 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 17 | LOCAL_SRC_FILES:= \ |
Joe Onorato | 84614dd | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 18 | spec.l \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 19 | rsg_generator.c |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 20 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 21 | include $(BUILD_HOST_EXECUTABLE) |
| 22 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 23 | # TODO: This should go into build/core/config.mk |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 24 | RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) |
| 25 | |
Shih-wei Liao | 7d1c533 | 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 | 60c3234 | 2011-01-12 19:14:27 -0800 | [diff] [blame] | 30 | |
Shih-wei Liao | 7d1c533 | 2011-01-14 04:26:30 -0800 | [diff] [blame] | 31 | # LOCAL_PRELINK_MODULE := false |
| 32 | # LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Shih-wei Liao | 60c3234 | 2011-01-12 19:14:27 -0800 | [diff] [blame] | 33 | |
Shih-wei Liao | 7d1c533 | 2011-01-14 04:26:30 -0800 | [diff] [blame] | 34 | # LOCAL_MODULE_TAGS := optional |
| 35 | # include frameworks/compile/slang/SlangData.mk |
| 36 | # include $(BUILD_STATIC_LIBRARY) |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 37 | |
| 38 | # Build render script lib ==================== |
Marco Nelissen | 2b16dfb | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 39 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 40 | include $(CLEAR_VARS) |
| 41 | LOCAL_MODULE := libRS |
| 42 | |
| 43 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 44 | intermediates:= $(local-intermediates-dir) |
| 45 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 46 | # Generate custom headers |
| 47 | |
| 48 | GEN := $(addprefix $(intermediates)/, \ |
| 49 | rsgApiStructs.h \ |
| 50 | rsgApiFuncDecl.h \ |
| 51 | ) |
| 52 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 53 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 54 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 55 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 56 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 57 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 58 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 59 | # used in jni/Android.mk |
| 60 | rs_generated_source += $(GEN) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 61 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 62 | |
| 63 | # Generate custom source files |
| 64 | |
| 65 | GEN := $(addprefix $(intermediates)/, \ |
| 66 | rsgApi.cpp \ |
| 67 | rsgApiReplay.cpp \ |
| 68 | ) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 69 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 70 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 71 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 72 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 73 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 74 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 75 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 76 | # used in jni/Android.mk |
| 77 | rs_generated_source += $(GEN) |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 78 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 79 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 80 | |
Marco Nelissen | 2b16dfb | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 81 | # 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. |
| 84 | ifneq ($(TARGET_SIMULATOR),true) |
| 85 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 86 | LOCAL_SRC_FILES:= \ |
| 87 | rsAdapter.cpp \ |
| 88 | rsAllocation.cpp \ |
Jason Sams | c1ed589 | 2010-03-10 17:30:41 -0800 | [diff] [blame] | 89 | rsAnimation.cpp \ |
Jason Sams | d01d970 | 2009-12-23 14:35:29 -0800 | [diff] [blame] | 90 | rsComponent.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 91 | rsContext.cpp \ |
| 92 | rsDevice.cpp \ |
| 93 | rsElement.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 94 | rsFileA3D.cpp \ |
| 95 | rsFont.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 96 | rsLocklessFifo.cpp \ |
| 97 | rsObjectBase.cpp \ |
| 98 | rsMatrix.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 99 | rsMesh.cpp \ |
| 100 | rsMutex.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 101 | rsProgram.cpp \ |
| 102 | rsProgramFragment.cpp \ |
Jason Sams | ccc010b | 2010-05-13 18:30:11 -0700 | [diff] [blame] | 103 | rsProgramStore.cpp \ |
Jason Sams | 5fd09d8 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 104 | rsProgramRaster.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 105 | rsProgramVertex.cpp \ |
| 106 | rsSampler.cpp \ |
| 107 | rsScript.cpp \ |
| 108 | rsScriptC.cpp \ |
Jason Sams | e45ac6e | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 109 | rsScriptC_Lib.cpp \ |
Jason Sams | aeb094b | 2010-05-18 13:35:45 -0700 | [diff] [blame] | 110 | rsScriptC_LibCL.cpp \ |
| 111 | rsScriptC_LibGL.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 112 | rsShaderCache.cpp \ |
Jason Sams | 12b14ae | 2010-03-18 11:39:44 -0700 | [diff] [blame] | 113 | rsSignal.cpp \ |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 114 | rsStream.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 115 | rsThreadIO.cpp \ |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 116 | rsType.cpp \ |
| 117 | rsVertexArray.cpp |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 118 | |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 119 | |
Shih-wei Liao | ce8a079 | 2010-12-20 20:45:56 +0800 | [diff] [blame] | 120 | LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 121 | |
Shih-wei Liao | ac091ba | 2011-01-14 05:00:37 -0800 | [diff] [blame] | 122 | LOCAL_STATIC_LIBRARIES := libdex libft2 |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 123 | |
Shih-wei Liao | ce8a079 | 2010-12-20 20:45:56 +0800 | [diff] [blame] | 124 | LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik |
Shih-wei Liao | 2b2e621 | 2011-01-14 06:21:28 -0800 | [diff] [blame] | 125 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
Alex Sakhartchouk | d3e0ad4 | 2010-06-24 17:15:34 -0700 | [diff] [blame] | 126 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 127 | LOCAL_LDLIBS := -lpthread -ldl |
| 128 | LOCAL_MODULE:= libRS |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 129 | LOCAL_MODULE_TAGS := optional |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 130 | |
| 131 | include $(BUILD_SHARED_LIBRARY) |
| 132 | |
Alex Sakhartchouk | 099d7d3 | 2011-01-28 09:31:47 -0800 | [diff] [blame^] | 133 | # Now build a host version for serialization |
| 134 | include $(CLEAR_VARS) |
| 135 | LOCAL_CFLAGS += -DANDROID_RS_BUILD_FOR_HOST |
| 136 | |
| 137 | LOCAL_SRC_FILES:= \ |
| 138 | rsAllocation.cpp \ |
| 139 | rsComponent.cpp \ |
| 140 | rsElement.cpp \ |
| 141 | rsFileA3D.cpp \ |
| 142 | rsObjectBase.cpp \ |
| 143 | rsMesh.cpp \ |
| 144 | rsStream.cpp \ |
| 145 | rsType.cpp |
| 146 | |
| 147 | LOCAL_STATIC_LIBRARIES := libcutils libutils |
| 148 | |
| 149 | LOCAL_LDLIBS := -lpthread |
| 150 | LOCAL_MODULE:= libRSserialize |
| 151 | LOCAL_MODULE_TAGS := optional |
| 152 | |
| 153 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 154 | |
Jason Sams | aef1458 | 2010-02-08 16:31:39 -0800 | [diff] [blame] | 155 | # include the java examples |
| 156 | include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ |
| 157 | java \ |
| 158 | )) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 159 | |
Marco Nelissen | 2b16dfb | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 160 | endif #simulator |