tree: ed36a87d5c376083f9e2838208fee045fcf13431 [path history] [tgz]
  1. .gitignore
  2. Android.mk
  3. Block.h
  4. Block_private.h
  5. config.h
  6. configure
  7. configure.rb
  8. data.c
  9. Makefile
  10. README.md
  11. runtime.c
libBlocksRuntime/README.md

libBlocksRuntime Android Port

This is a port of libBlocksRuntime to the Android NDK.

As of NDK-r8, Clang ships as an unsupported compiler. Using the -fblocks compile flag and linking against this library fully enables Apple's blocks extension on Android.

Compilation

Do not use configure or the Makefile; these are there in order to build for other supported platforms.

  1. Add libblocksruntime to your LOCAL_STATIC_LIBRARIES.

  2. Add the directory with blocks.h to your include list via LOCAL_CFLAGS

  3. Specify clang as the compiler of choice, either in Application.mk or from the command line when building.

    NDK_TOOLCHAIN_VERSION=“clang3.1” ndk-build