Android编译分析

Android-6.0编译分析


 
#Start
source env.sh
    source build/envsetup.sh
        . device/.../vendorsetup.sh
        . vendor/.../vendorsetup.sh
        addcompletions

lunch ...
    set_stuff_for_environment
        setpaths
            local ARCH=$(get_build_var TARGET_ARCH)
                get_build_var()
                    CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
                        command make --no-print-directory -f build/core/config.mk dumpvar-$1
                    build/core/config.mk dumpvar-TARGET_ARCH
                        include $(BUILD_SYSTEM)/dumpvar.mk
                            $(dumpvar_target):@echo $(DUMPVAR_VALUE)
                            
make
Makefile
    build/core/main.mk
        include $(BUILD_SYSTEM)/config.mk
            include $(BUILD_SYSTEM)/envsetup.mk
            FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
            include $(BUILD_SYSTEM)/product_config.mk
                include $(BUILD_SYSTEM)/product.mk
                #查找所有AndroidProducts.mk
                all_product_configs := $(get-all-product-makefiles)
                    $(call get-product-makefiles,$(_find-android-products-files)) #product.mk
                        $(eval include $(f))
                        #include device/.../AndroidProducts.mk
                        #include vendor/.../AndroidProducts.mk
                        #include $(SRC_TARGET_DIR)/product/AndroidProducts.mk
                            TARGET_BUILD_APPS=
                #查找所有product配置Makefile
                $(call import-products, $(current_product_makefile))
                    $(call import-nodes,PRODUCTS,$(1),$(_product_var_list))
                    ----
                    device/r/k/r_k.mk
                        $(call inherit-product, device/r/k/device.mk)
                        $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
                            $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
                                $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk)
                                    $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
                        $(call inherit-product, device/r/k/r/r.mk)
                    ----
        #查找所有Android.mk
        subdir_makefiles := $(shell build/tools/findleaves.py $(FIND_LEAVES_EXCLUDES) $(subdirs) Android.mk) 
        $(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk)))

#End

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值