forked from openkylin/platform_build
Integrate the slang "-MD" into the build system.
So that the header dependency can be included. Bug: 2932230 Change-Id: I4d69870049157206ce2ab637ec6d673467db0c64
This commit is contained in:
parent
a5a684c32b
commit
24e1c018ba
|
@ -770,6 +770,8 @@ $(hide) mkdir -p $(PRIVATE_RS_OUTPUT_DIR)/src
|
|||
$(hide) $(SLANG) \
|
||||
-o $(PRIVATE_RS_OUTPUT_DIR)/res/raw \
|
||||
-p $(PRIVATE_RS_OUTPUT_DIR)/src \
|
||||
-d $(PRIVATE_RS_OUTPUT_DIR) \
|
||||
-a $@ -MD \
|
||||
$(foreach inc,$(PRIVATE_RS_INCLUDES),$(addprefix -I , $(inc))) \
|
||||
$(PRIVATE_RS_SOURCE_FILES)
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
|
|
|
@ -123,6 +123,7 @@ RenderScript_file_stamp :=
|
|||
ifneq ($(renderscript_sources),)
|
||||
renderscript_sources_fullpath := $(addprefix $(LOCAL_PATH)/, $(renderscript_sources))
|
||||
RenderScript_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/RenderScript.stamp
|
||||
renderscript_intermediate := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript
|
||||
|
||||
# prepend the RenderScript system include path
|
||||
LOCAL_RENDERSCRIPT_INCLUDES := $(TOPDIR)frameworks/base/libs/rs/scriptc \
|
||||
|
@ -132,11 +133,15 @@ $(RenderScript_file_stamp): PRIVATE_RS_INCLUDES := $(LOCAL_RENDERSCRIPT_INCLUDES
|
|||
$(RenderScript_file_stamp): PRIVATE_RS_SOURCE_FILES := $(renderscript_sources_fullpath)
|
||||
# By putting the generated java files into $(LOCAL_INTERMEDIATE_SOURCE_DIR), they will be
|
||||
# automatically found by the java compiling function transform-java-to-classes.jar.
|
||||
$(RenderScript_file_stamp): PRIVATE_RS_OUTPUT_DIR := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript
|
||||
# TODO: slang support to generate implicit dependency derived from "include" directives.
|
||||
$(RenderScript_file_stamp): PRIVATE_RS_OUTPUT_DIR := $(renderscript_intermediate)
|
||||
$(RenderScript_file_stamp): $(renderscript_sources_fullpath) $(SLANG)
|
||||
$(transform-renderscripts-to-java-and-bc)
|
||||
|
||||
# include the dependency files (.d) generated by slang.
|
||||
renderscript_generated_dep_files := $(addprefix $(renderscript_intermediate)/, \
|
||||
$(patsubst %.rs,%.d, $(notdir $(renderscript_sources))))
|
||||
-include $(renderscript_generated_dep_files)
|
||||
|
||||
LOCAL_INTERMEDIATE_TARGETS += $(RenderScript_file_stamp)
|
||||
# Make sure the generated resource will be added to the apk.
|
||||
LOCAL_RESOURCE_DIR := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript/res $(LOCAL_RESOURCE_DIR)
|
||||
|
|
Loading…
Reference in New Issue