NDK帮助文档学习--NDK-BUILD.html
来源:互联网 发布:淘宝网高档棉麻围巾 编辑:程序博客网 时间:2024/04/28 12:52
android-ndk-r7b\docs\NDK-BUILD.html
The Android NDK r4 introduced a new tiny shell script, named 'ndk-build',to simplify building machine code.
Options:------------
ndk-build --> rebuild required machine code. ndk-build clean --> clean all generated binaries. ndk-build NDK_DEBUG=1 --> generate debuggable native code. ndk-build V=1 --> launch build, displaying build commands. ndk-build -B --> force a complete rebuild. ndk-build -B V=1 --> force a complete rebuild and display build commands. ndk-build NDK_LOG=1 --> display internal NDK log messages (used for debugging the NDK itself). ndk-build NDK_DEBUG=1 --> force a debuggable build. ndk-build NDK_DEBUG=0 --> force a release build. ndk-build NDK_APPLICATION_MK=<file> --> rebuild, using a specific Application.mk pointed to by the NDK_APPLICATION_MK command-line variable. ndk-build -C <project> --> build the native code for the project path located at <project>. Useful if you don't want to 'cd' to it in your terminal.
If you don't specify NDK_DEBUG, ndk-build will keep its default behaviour,which is to inspect the AndroidManifest.xml, if any, and see if its<application> element has android:debuggable="true".IMPORTANT: If you use the build tools of SDK r8 (or higher), you won't need to touch your AndroidManifest.xml file at all! That's because if you build a debug package (e.g. with "ant debug" or the corresponding option of the ADT plugin), the tool will automatically pick the native debug files generated with NDK_DEBUG=1.Also, as a convenience, the release and debug object files generated by theNDK are now stored in different directories (e.g. obj/local/<abi>/objs andobj/local/<abi>/objs-debug). This avoids having to recompile all your sourceswhen you switch between these two modes (even when you only modified one ortwo source files).
Requirements:-----------------You need GNU Make 3.81 or later to use 'ndk-build' or the NDK in general.The build scripts will detect that you're using a non-compliant Make tooland will complain with an error message.If you have GNU Make 3.81 installed, but that it is not launched by thedefault 'make' command, define GNUMAKE in your environment to point to itbefore launching 'ndk-build'. For example: GNUMAKE=/usr/local/bin/gmake ndk-buildOr to make the change more permanent: export GNUMAKE=/usr/local/bin/gmake ndk-buildAdapt to your shell and GNU Make 3.81 installation location.
Internals:-------------'ndk-build' itself is a tiny wrapper around GNU Make, its purpose is simplyto invoke the right NDK build script, it is equivalent to; $GNUMAKE -f $NDK/build/core/build-local.mk [parameters]Where '$GNUMAKE' points to GNU Make 3.81 or later, and $NDK points to yourNDK installation directory.Use this knowledge if you want to invoke the NDK build script from othershell scripts (or even your own Makefiles).
- NDK帮助文档学习--NDK-BUILD.html
- NDK帮助文档学习--NDK-GDB.html
- NDK帮助文档学习--OVERVIER.html
- NDK帮助文档学习--ANDROID-MK.html
- NDK帮助文档学习--APPLICATION-MK.html
- NDK帮助文档学习--CPLUSPLUS-SUPPORT.html
- android NDK 帮助文档重点
- NDK build
- ndk-build
- ndk-build
- ndk-build
- ndk-build
- ANDROID NDK文档系列--(11)NDK Build
- NDK Build学习笔记<二>:NDK的使用
- Android NDK学习之二. ndk-build使用
- NDK(三)ndk-build
- NDK开发(一)--ndk-build
- NDK Build 用法(NDK Build)
- Linux command命令
- Android底层库和程序
- 2. Android中SlidingDrawer介绍
- 算法过程
- MyEclipse 修改web项目工程编码
- NDK帮助文档学习--NDK-BUILD.html
- Java The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class
- Oracle常用傻瓜问题1000问
- linux下的系统调用
- 制作和unity调用动态链接库dll文件
- 最新下载 android 源码方法
- poj 1985 重点学习图的存储方法
- java Floyd 实现
- C#用户控件示例