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 \ |
Jason Sams | f468700 | 2010-03-10 17:30:41 -0800 | [diff] [blame] | 79 | rsAnimation.cpp \ |
Jason Sams | 718cd1f | 2009-12-23 14:35:29 -0800 | [diff] [blame] | 80 | rsComponent.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 81 | rsContext.cpp \ |
| 82 | rsDevice.cpp \ |
| 83 | rsElement.cpp \ |
Jason Sams | c1d726c | 2010-03-18 11:39:44 -0700 | [diff] [blame^] | 84 | rsFileA3D.cpp \ |
Jason Sams | bba134c | 2009-06-22 15:49:21 -0700 | [diff] [blame] | 85 | rsLight.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 86 | rsLocklessFifo.cpp \ |
| 87 | rsObjectBase.cpp \ |
| 88 | rsMatrix.cpp \ |
Jason Sams | c1d726c | 2010-03-18 11:39:44 -0700 | [diff] [blame^] | 89 | rsMesh.cpp \ |
| 90 | rsMutex.cpp \ |
Romain Guy | ecc7ca0 | 2009-08-03 21:12:51 -0700 | [diff] [blame] | 91 | rsNoise.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 92 | rsProgram.cpp \ |
| 93 | rsProgramFragment.cpp \ |
| 94 | rsProgramFragmentStore.cpp \ |
Jason Sams | ebfb436 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 95 | rsProgramRaster.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 96 | rsProgramVertex.cpp \ |
| 97 | rsSampler.cpp \ |
| 98 | rsScript.cpp \ |
| 99 | rsScriptC.cpp \ |
Jason Sams | c97bb88 | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 100 | rsScriptC_Lib.cpp \ |
Jason Sams | c1d726c | 2010-03-18 11:39:44 -0700 | [diff] [blame^] | 101 | rsShaderCache.cpp \ |
| 102 | rsSignal.cpp \ |
Jason Sams | 1bada8c | 2009-08-09 17:01:55 -0700 | [diff] [blame] | 103 | rsSimpleMesh.cpp \ |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 104 | rsThreadIO.cpp \ |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 105 | rsType.cpp \ |
| 106 | rsVertexArray.cpp |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 107 | |
Jason Sams | bb51c40 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 108 | |
| 109 | LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libacc |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 110 | LOCAL_LDLIBS := -lpthread -ldl |
| 111 | LOCAL_MODULE:= libRS |
Jason Sams | 94d8e90a | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 112 | LOCAL_MODULE_TAGS := optional |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 113 | |
| 114 | include $(BUILD_SHARED_LIBRARY) |
| 115 | |
Jason Sams | 5bec3aa | 2010-02-08 16:31:39 -0800 | [diff] [blame] | 116 | # include the java examples |
| 117 | include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ |
| 118 | java \ |
| 119 | )) |
Jason Sams | d19f10d | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 120 | |
Marco Nelissen | 3f8f9da8 | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 121 | endif #simulator |