From 0ab6e3e6e62bed00f300fd60110a00ed4ee397cb Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Thu, 11 Oct 2012 15:01:53 -0700 Subject: [PATCH] Add support for building Filterscript files. This change piggybacks Filterscript rules onto the existing Renderscript rules. There is no real difference other than the file extension (which llvm-rs-cc uses to apply a more stringent set of warnings/errors). Bug: 7166741 Change-Id: I27175ff1c16c27129cafa92b4e8caabf2e5f4150 --- core/definitions.mk | 2 +- core/java.mk | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index 13af6fc358..aa23d9dc1e 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -269,7 +269,7 @@ endef define all-renderscript-files-under $(patsubst ./%,%, \ $(shell cd $(LOCAL_PATH) ; \ - find $(1) -name "*.rs" -and -not -name ".*") \ + find $(1) \( -name "*.rs" -or -name "*.fs" \) -and -not -name ".*") \ ) endef diff --git a/core/java.mk b/core/java.mk index 66f9a02155..99e67f4d2c 100644 --- a/core/java.mk +++ b/core/java.mk @@ -133,8 +133,9 @@ LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src ############################################################### ## .rs files: RenderScript sources to .java files and .bc files +## .fs files: Filterscript sources to .java files and .bc files ############################################################### -renderscript_sources := $(filter %.rs,$(LOCAL_SRC_FILES)) +renderscript_sources := $(filter %.rs %.fs,$(LOCAL_SRC_FILES)) # Because names of the java files from RenderScript are unknown until the # .rs file(s) are compiled, we have to depend on a timestamp file. RenderScript_file_stamp := @@ -196,7 +197,7 @@ $(RenderScript_file_stamp): $(renderscript_sources_fullpath) $(LOCAL_RENDERSCRIP # include the dependency files (.d) generated by llvm-rs-cc. renderscript_generated_dep_files := $(addprefix $(renderscript_intermediate)/, \ - $(patsubst %.rs,%.d, $(notdir $(renderscript_sources)))) + $(patsubst %.fs,%.d, $(patsubst %.rs,%.d, $(notdir $(renderscript_sources))))) -include $(renderscript_generated_dep_files) LOCAL_INTERMEDIATE_TARGETS += $(RenderScript_file_stamp)