forked from openkylin/platform_build
Merge change 954
* changes: Extend build system to compile generated "C" files.
This commit is contained in:
commit
e159bea824
|
@ -211,6 +211,23 @@ $(c_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.c $(yacc_cpps) $(PR
|
|||
-include $(c_objects:%.o=%.P)
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
## C: Compile generated .c files to .o.
|
||||
###########################################################
|
||||
|
||||
gen_c_sources := $(filter %.c,$(LOCAL_GENERATED_SOURCES))
|
||||
gen_c_objects := $(gen_c_sources:%.c=%.o)
|
||||
|
||||
ifneq ($(strip $(gen_c_objects)),)
|
||||
# Compile all generated files as thumb.
|
||||
# TODO: support compiling certain generated files as arm.
|
||||
$(gen_c_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
|
||||
$(gen_c_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
|
||||
$(gen_c_objects): $(intermediates)/%.o: $(intermediates)/%.c $(yacc_cpps) $(PRIVATE_ADDITIONAL_DEPENDENCIES)
|
||||
$(transform-$(PRIVATE_HOST)c-to-o)
|
||||
-include $(gen_c_objects:%.o=%.P)
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
## AS: Compile .S files to .o.
|
||||
###########################################################
|
||||
|
@ -248,6 +265,7 @@ all_objects := \
|
|||
$(gen_cpp_objects) \
|
||||
$(gen_asm_objects) \
|
||||
$(c_objects) \
|
||||
$(gen_c_objects) \
|
||||
$(yacc_objects) \
|
||||
$(lex_objects) \
|
||||
$(addprefix $(TOPDIR)$(LOCAL_PATH)/,$(LOCAL_PREBUILT_OBJ_FILES))
|
||||
|
|
Loading…
Reference in New Issue