Jason Sams | 8af858e9 | 2009-07-23 16:10:46 -0700 | [diff] [blame] | 1 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 2 | LOCAL_PATH:=$(call my-dir) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 3 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 4 | |
| 5 | # Build rsg-generator ==================== |
| 6 | include $(CLEAR_VARS) |
Jason Sams | d19f10d | 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 | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 15 | intermediates := $(local-intermediates-dir) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 16 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 17 | LOCAL_SRC_FILES:= \ |
Joe Onorato | daed524 | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 18 | spec.l \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 19 | rsg_generator.c |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 20 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 21 | include $(BUILD_HOST_EXECUTABLE) |
| 22 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 23 | # TODO: This should go into build/core/config.mk |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 24 | RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) |
| 25 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 26 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 27 | |
| 28 | # Build render script lib ==================== |
Marco Nelissen | 3f8f9da8 | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 29 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 30 | include $(CLEAR_VARS) |
| 31 | LOCAL_MODULE := libRS |
| 32 | |
| 33 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 34 | intermediates:= $(local-intermediates-dir) |
| 35 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 36 | # Generate custom headers |
| 37 | |
| 38 | GEN := $(addprefix $(intermediates)/, \ |
| 39 | rsgApiStructs.h \ |
| 40 | rsgApiFuncDecl.h \ |
| 41 | ) |
| 42 | |
Jason Sams | 196ac85 | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 43 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 44 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 45 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 46 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 47 | $(transform-generated-source) |
Jack Palevich | eaff307 | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 48 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 49 | # used in jni/Android.mk |
| 50 | rs_generated_source += $(GEN) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 51 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 52 | |
| 53 | # Generate custom source files |
| 54 | |
| 55 | GEN := $(addprefix $(intermediates)/, \ |
| 56 | rsgApi.cpp \ |
| 57 | rsgApiReplay.cpp \ |
| 58 | ) |
Jack Palevich | eaff307 | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 59 | |
Jason Sams | 196ac85 | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 60 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 61 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 62 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 63 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 64 | $(transform-generated-source) |
Jack Palevich | eaff307 | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 65 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 66 | # used in jni/Android.mk |
| 67 | rs_generated_source += $(GEN) |
Jason Sams | 196ac85 | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 68 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 69 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 70 | |
Marco Nelissen | 3f8f9da8 | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 71 | # libRS needs libacc, which isn't 64-bit clean, and so can't be built |
| 72 | # for the simulator on gHardy, and therefore libRS needs to be excluded |
| 73 | # from the simulator as well. |
| 74 | ifneq ($(TARGET_SIMULATOR),true) |
| 75 | |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 76 | LOCAL_SRC_FILES:= \ |
| 77 | rsAdapter.cpp \ |
| 78 | rsAllocation.cpp \ |
| 79 | rsComponent.cpp \ |
| 80 | rsContext.cpp \ |
| 81 | rsDevice.cpp \ |
| 82 | rsElement.cpp \ |
Jason Sams | 7aa4f3a | 2009-07-10 17:32:40 -0700 | [diff] [blame] | 83 | rsFileA3D.cpp \ |
Jason Sams | bba134c | 2009-06-22 15:49:21 -0700 | [diff] [blame] | 84 | rsLight.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 85 | rsLocklessFifo.cpp \ |
| 86 | rsObjectBase.cpp \ |
| 87 | rsMatrix.cpp \ |
Jason Sams | 7aa4f3a | 2009-07-10 17:32:40 -0700 | [diff] [blame] | 88 | rsMesh.cpp \ |
Romain Guy | ecc7ca0 | 2009-08-03 21:12:51 -0700 | [diff] [blame] | 89 | rsNoise.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 90 | rsProgram.cpp \ |
| 91 | rsProgramFragment.cpp \ |
| 92 | rsProgramFragmentStore.cpp \ |
Jason Sams | ebfb436 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 93 | rsProgramRaster.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 94 | rsProgramVertex.cpp \ |
| 95 | rsSampler.cpp \ |
| 96 | rsScript.cpp \ |
| 97 | rsScriptC.cpp \ |
Jason Sams | c97bb88 | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 98 | rsScriptC_Lib.cpp \ |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 99 | rsShaderCache.cpp \ |
Jason Sams | 1bada8c | 2009-08-09 17:01:55 -0700 | [diff] [blame] | 100 | rsSimpleMesh.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 101 | rsThreadIO.cpp \ |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 102 | rsType.cpp \ |
| 103 | rsVertexArray.cpp |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 104 | |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 105 | |
| 106 | LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libacc |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 107 | LOCAL_LDLIBS := -lpthread -ldl |
| 108 | LOCAL_MODULE:= libRS |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 109 | LOCAL_MODULE_TAGS := optional |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 110 | |
| 111 | include $(BUILD_SHARED_LIBRARY) |
| 112 | |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 113 | # Include the subdirectories ==================== |
| 114 | include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 115 | java \ |
| 116 | )) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 117 | |
Marco Nelissen | 3f8f9da8 | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 118 | endif #simulator |