The Ndk-build command for NDK development

Source: Internet
Author: User

Without a doubt, launch the Android NDK build system by executing the Ndk-build script.
By default, Ndk-build scripts are executed in the project's home directory, such as:

We can use the-c parameter to change the above behavior,-c specifies the project directory so that we can execute the Ndk-build script in any directory.

If the source file is not modified, then the Android NDK build system does not rebuild the target, and we can use parameter-B to force the rebuild of all the source code.

If you want to clean up the generated binaries and destination files, you can use the Ndk-build clear command.

The Android NDK build system relies on the gun make tool to build the module, by default, the gun making tool executes a build command at a time, and then executes the next sentence after the sentence is executed, and if we use the-j parameter, GUN make can execute the build command in parallel.

The following is a representation of two commands in parallel execution:

If we want to see the system log generated during the build, you can use the following command:

The log information is prefixed with the Android NDK.

If you want to see only the build commands that you actually execute, you can use the following command:

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. If there is a wrong place, I would appreciate it if I could criticize it.

The Ndk-build command for NDK development

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.