commit | 32e74f3f1b969ff65f037e1ee89e21a5cbc0ecf0 | [log] [tgz] |
---|---|---|
author | Dan Albert <danalbert@google.com> | Tue Jun 23 16:55:28 2015 -0700 |
committer | Dan Albert <danalbert@google.com> | Tue Jun 23 16:57:10 2015 -0700 |
tree | 9e8dcac728e086245ad10cc65e8ca06efdf7df1a | |
parent | 6c60cbbb8f56b053dc638d6ea6429fc5dae3c617 [diff] |
Disable -Werror for ndk-stack. This project is not -Werrror clean. We should come back and clean this up at some point, but right now it's a giant pain to even build the thing (the makefile requires having most of the interesting cflags/ldflags set in your environment). Bug: http://b/21534147 Change-Id: I04f7d557b1d0248b27f3d82a89be98d35a2d2f76
The NDK allows Android application developers to include native code in their Android application packages, compiled as JNI shared libraries.
See the Getting Started Guide for an introduction.
See the changelist for a list of changes since the previous release.
Finally, discussions related to the Android NDK happen on the android-ndk Google Group.
Note: This document is for developers of the NDK, not developers that use the NDK.
Both Linux and Windows host binaries are built on Linux machines. Windows host binaries is built via MinGW cross compiler. Systems without a working MinGW compiler can use build/tools/build-mingw64-toolchain.sh
to generate their own and be added to the PATH
for build scripts to discover.
Building binaries for Mac OS X requires at least 10.8.
Target headers and binaries are built on Linux.
The NDK consists of three parts: host binaries, target prebuilts, and others (build system, docs, samples, tests).
toolchains/
contains GCC, Clang, and Renderscript toolchains.$TOOLCHAIN/config.mk
contains ARCH and ABIS this toolchain can handle.$TOOLCHAIN/setup.mk
contains toolchain-specific default CFLAGS/LDFLAGS when this toolchain is used.prebuilt/$HOST_ARCH/
contains various tools to make build system hermetic.prebuilt/common
contains the scan-build
and scan-view
scripts used by static analyzer via NDK_ANALYZE=1
.ndk-depends
and ndk-stack
should probably go in prebuilt/
to avoid collisions between host variants.platforms/android-N/arch-$ARCH_NAME/
contains headers and libraries for each API level.--sysroot
to one of these directories based on user-specified APP_ABI
and APP_PLATFORM
.sources/cxx-stl/$STL/$ABI/
contains the headers and libraries for the various C++ STLs.prebuilt/android-$ARCH/gdbserver/
contains gdbserver.build/
contains the ndk-build system and scripts to rebuild NDK.docs/
samples/
sources/
contains modules useful in samples and apps via $(call import-module, $MODULE)
tests/
Check out the branch master-ndk
repo init -u https://android.googlesource.com/platform/manifest \ -b master-ndk # Googlers, use repo init -u \ persistent-https://android.git.corp.google.com/platform/manifest \ -b master-ndk
The only difference between the NDK branch and master is that the NDK repository already has the toolchain repository checked out and patched.
Additional Linux Dependencies (available from apt):
Mac OS X also requires Xcode.
$ checkbuild.sh --also-64 --systems=linux-x86,windows
$ checkbuild.sh --systems=darwin-x86 --try-64 $ checkbuild.sh --systems=darwin-x86
Once all prebuilt tarballs are at $PREBUILT_PATH
, run the following to package the NDK:
$ build/tools/package-release.sh --prebuilt-dir=/s/prebuilt --separate-64 \ --release=r9x
build/tools/dev-cleanup.sh
which erases all prebuilts.$PREBUILT_PATH
. It runs build/tools/build-docs.sh
which produces no tarball in $PREBUILT_PATH
.