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 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 26 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 27 | |
| 28 | # Build render script lib ==================== |
Marco Nelissen | 2b16dfb | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 29 | |
Jason Sams | 326e0dd | 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 | 326e0dd | 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 | 81e48fa | 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 | 326e0dd | 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 | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 48 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 49 | # used in jni/Android.mk |
| 50 | rs_generated_source += $(GEN) |
Jason Sams | 326e0dd | 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 | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 59 | |
Jason Sams | 81e48fa | 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 | 326e0dd | 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 | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 65 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 66 | # used in jni/Android.mk |
| 67 | rs_generated_source += $(GEN) |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 68 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 69 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 70 | |
Marco Nelissen | 2b16dfb | 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 | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 76 | LOCAL_SRC_FILES:= \ |
| 77 | rsAdapter.cpp \ |
| 78 | rsAllocation.cpp \ |
Jason Sams | c1ed589 | 2010-03-10 17:30:41 -0800 | [diff] [blame^] | 79 | rsAnimation.cpp \ |
Jason Sams | d01d970 | 2009-12-23 14:35:29 -0800 | [diff] [blame] | 80 | rsComponent.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 81 | rsContext.cpp \ |
| 82 | rsDevice.cpp \ |
| 83 | rsElement.cpp \ |
Jason Sams | b80dfa7 | 2009-07-10 17:32:40 -0700 | [diff] [blame] | 84 | rsFileA3D.cpp \ |
Jason Sams | 62bc1db | 2009-06-22 15:49:21 -0700 | [diff] [blame] | 85 | rsLight.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 86 | rsLocklessFifo.cpp \ |
| 87 | rsObjectBase.cpp \ |
| 88 | rsMatrix.cpp \ |
Jason Sams | b80dfa7 | 2009-07-10 17:32:40 -0700 | [diff] [blame] | 89 | rsMesh.cpp \ |
Romain Guy | b7f1a6d | 2009-08-03 21:12:51 -0700 | [diff] [blame] | 90 | rsNoise.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 91 | rsProgram.cpp \ |
| 92 | rsProgramFragment.cpp \ |
| 93 | rsProgramFragmentStore.cpp \ |
Jason Sams | 5fd09d8 | 2009-09-23 13:57:02 -0700 | [diff] [blame] | 94 | rsProgramRaster.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 95 | rsProgramVertex.cpp \ |
| 96 | rsSampler.cpp \ |
| 97 | rsScript.cpp \ |
| 98 | rsScriptC.cpp \ |
Jason Sams | e45ac6e | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 99 | rsScriptC_Lib.cpp \ |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 100 | rsShaderCache.cpp \ |
Jason Sams | e5ffb87 | 2009-08-09 17:01:55 -0700 | [diff] [blame] | 101 | rsSimpleMesh.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 102 | rsThreadIO.cpp \ |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 103 | rsType.cpp \ |
| 104 | rsVertexArray.cpp |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 105 | |
Jason Sams | c460e55 | 2009-11-25 13:22:07 -0800 | [diff] [blame] | 106 | |
| 107 | LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libacc |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 108 | LOCAL_LDLIBS := -lpthread -ldl |
| 109 | LOCAL_MODULE:= libRS |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 110 | LOCAL_MODULE_TAGS := optional |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 111 | |
| 112 | include $(BUILD_SHARED_LIBRARY) |
| 113 | |
Jason Sams | aef1458 | 2010-02-08 16:31:39 -0800 | [diff] [blame] | 114 | # include the java examples |
| 115 | include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ |
| 116 | java \ |
| 117 | )) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 118 | |
Marco Nelissen | 2b16dfb | 2009-08-12 09:41:07 -0700 | [diff] [blame] | 119 | endif #simulator |