[Turn] tips for writing local_c_includes in Android.mk

Source: Internet
Author: User

look at the original text, please: Writing android.mk in the local_c_includes skills

in writingandroid.mkIn the process, it is unavoidable to modifyLOCAL_C_INCLUDESTo set the Include directory for the header file, which is generally written like this

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes                     $(LOCAL_PATH)/../../Classes/game                     $(LOCAL_PATH)/../../Classes/logic                     $(LOCAL_PATH)/../../Classes/view                    

There is a directory to write a line, really cumbersome, there is no writing can be the source directory of all sub-directories are introduced, see below

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../ClassesLOCAL_C_INCLUDES += $(shell ls -FR $(LOCAL_C_INCLUDES) | grep $(LOCAL_PATH)/$ )LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES:$(LOCAL_PATH)/%:=$(LOCAL_PATH)/%)

You can $(LOCAL_PATH)/../../Classes include all the directories and subdirectories in the list.

There is also a way to usesedcommand, the effect was the same, and IsedNot very familiar, simply write a bit

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes LOCAL_C_INCLUDES += $(shell ls -FR $(LOCAL_C_INCLUDES) | grep $(LOCAL_PATH)/$ | sed "s/:/ /g" )

The results of these two lines are the same as the above three rows.

[Turn] tips for writing local_c_includes in Android.mk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.