• Makefile中的ifeq 多条件使用 ***


    MAKEFILE多分支写法:

    Android中的NDK程序android.mk判断当前是哪种CPU架构:

        ifeq ($(TARGET_ARCH), arm)
            LOCAL_SRC_FILES := ...
        else ifeq ($(TARGET_ARCH), x86)
            LOCAL_SRC_FILES := ...
        else ifeq ($(TARGET_ARCH), mips)
            LOCAL_SRC_FILES := ...
        else 
            LOCAL_SRC_FILES := ...
        endif

    MAKEFILE多条件“或”:

    ifneq ($(CONFIG_SUPPORT_BOOTLOADER_OTA_UPGRADE)_$(CONFIG_SUPPORT_REMOVE_LDO)_$(CONFIG_SUPPORT_TUNER_FORM_BOOT),0_0_0)
    source_dir_ota += $(ROOT)/ota/mid/common
    source_dir_ota += $(ROOT)/ota/driver/Tuner_demod 
    source_dir_ota += $(ROOT)/ota/driver/Tuner_demod/Tuner/
    source_dir_ota += $(ROOT)/ota/driver/Tuner_demod/Tuner_demod_api
    CONFIG_TUNERTYPE:=$(subst ",,$(CONFIG_TUNERTYPE))

    MAKEFILE多条件“与”:

    ifeq ($(CONFIG_SUPPORT_BOOTLOADER_OTA_UPGRADE)_$(CONFIG_SUPPORT_REMOVE_LDO)_$(CONFIG_SUPPORT_TUNER_FORM_BOOT),y_y_y)
    source_dir_ota += $(ROOT)/ota/mid/common
    source_dir_ota += $(ROOT)/ota/driver/Tuner_demod 
    source_dir_ota += $(ROOT)/ota/driver/Tuner_demod/Tuner/
    source_dir_ota += $(ROOT)/ota/driver/Tuner_demod/Tuner_demod_api
    CONFIG_TUNERTYPE:=$(subst ",,$(CONFIG_TUNERTYPE))
  • 相关阅读:
    C++ 中static 使用大全
    JsonCpp 简单使用
    [转]C++ string的trim, split方法
    线程函数
    C++ 读写文件流
    JQ_返回顶部
    JQ_开发经验
    JQ_五星级评分特效
    JQ_One()函数特效
    JQ_插件开发
  • 原文地址:https://www.cnblogs.com/jiangzhaowei/p/7602334.html
Copyright © 2020-2023  润新知