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 ==================== |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 29 | include $(CLEAR_VARS) |
| 30 | LOCAL_MODULE := libRS |
| 31 | |
| 32 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 33 | intermediates:= $(local-intermediates-dir) |
| 34 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 35 | # Generate custom headers |
| 36 | |
| 37 | GEN := $(addprefix $(intermediates)/, \ |
| 38 | rsgApiStructs.h \ |
| 39 | rsgApiFuncDecl.h \ |
| 40 | ) |
| 41 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 42 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 43 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 44 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 45 | $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.rsg |
| 46 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 47 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 48 | # used in jni/Android.mk |
| 49 | rs_generated_source += $(GEN) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 50 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 51 | |
| 52 | # Generate custom source files |
| 53 | |
| 54 | GEN := $(addprefix $(intermediates)/, \ |
| 55 | rsgApi.cpp \ |
| 56 | rsgApiReplay.cpp \ |
| 57 | ) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 58 | |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 59 | $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) |
| 60 | $(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR) $< $@ <$(PRIVATE_PATH)/rs.spec |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 61 | $(GEN) : $(RSG_GENERATOR) $(LOCAL_PATH)/rs.spec |
| 62 | $(GEN): $(intermediates)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg |
| 63 | $(transform-generated-source) |
Jack Palevich | a5e094b | 2009-05-26 17:23:34 -0700 | [diff] [blame] | 64 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 65 | # used in jni/Android.mk |
| 66 | rs_generated_source += $(GEN) |
Jason Sams | 81e48fa | 2009-06-10 18:35:42 -0700 | [diff] [blame] | 67 | |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 68 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 69 | |
| 70 | LOCAL_SRC_FILES:= \ |
| 71 | rsAdapter.cpp \ |
| 72 | rsAllocation.cpp \ |
| 73 | rsComponent.cpp \ |
| 74 | rsContext.cpp \ |
| 75 | rsDevice.cpp \ |
| 76 | rsElement.cpp \ |
Jason Sams | b80dfa7 | 2009-07-10 17:32:40 -0700 | [diff] [blame] | 77 | rsFileA3D.cpp \ |
Jason Sams | 62bc1db | 2009-06-22 15:49:21 -0700 | [diff] [blame] | 78 | rsLight.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 79 | rsLocklessFifo.cpp \ |
| 80 | rsObjectBase.cpp \ |
| 81 | rsMatrix.cpp \ |
Jason Sams | b80dfa7 | 2009-07-10 17:32:40 -0700 | [diff] [blame] | 82 | rsMesh.cpp \ |
Romain Guy | b7f1a6d | 2009-08-03 21:12:51 -0700 | [diff] [blame] | 83 | rsNoise.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 84 | rsProgram.cpp \ |
| 85 | rsProgramFragment.cpp \ |
| 86 | rsProgramFragmentStore.cpp \ |
| 87 | rsProgramVertex.cpp \ |
| 88 | rsSampler.cpp \ |
| 89 | rsScript.cpp \ |
| 90 | rsScriptC.cpp \ |
Jason Sams | e45ac6e | 2009-07-20 14:31:06 -0700 | [diff] [blame] | 91 | rsScriptC_Lib.cpp \ |
Jason Sams | e5ffb87 | 2009-08-09 17:01:55 -0700 | [diff] [blame] | 92 | rsSimpleMesh.cpp \ |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 93 | rsThreadIO.cpp \ |
| 94 | rsType.cpp \ |
| 95 | rsTriangleMesh.cpp |
| 96 | |
Jack Palevich | 1ef8b80 | 2009-05-28 15:53:04 -0700 | [diff] [blame] | 97 | LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libui libacc |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 98 | LOCAL_LDLIBS := -lpthread -ldl |
| 99 | LOCAL_MODULE:= libRS |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 100 | LOCAL_MODULE_TAGS := optional |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 101 | |
| 102 | include $(BUILD_SHARED_LIBRARY) |
| 103 | |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 104 | # Include the subdirectories ==================== |
| 105 | include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ |
Jason Sams | c7f6ce4 | 2009-06-10 16:09:05 -0700 | [diff] [blame] | 106 | java \ |
| 107 | )) |
Jason Sams | 326e0dd | 2009-05-22 14:03:28 -0700 | [diff] [blame] | 108 | |