1This directory contains an Android NDK import module for NORM, which builds
2a shared library, and the JNI bindings.
3
4Using NORM in your pure Java Android Application
5------------------------------------------------
6
71. First, update the library project to point to your Android SDK:
8
9    android update lib-project --target <id> --path /path/to/norm/makefiles/android
10    android update lib-project --target <id> --path /path/to/protolib/makefiles/android
11
12   Use "android list targets" to see the ids of the SDK targets you have
13   installed.
14
152. Add a "jni/Application.mk" in the root of your project to reference NORM:
16    * You must at least set "APP_MODULES := norm-jni"
17    * You should set "APP_BUILD_SCRIPT := /path/to/norm/makefiles/android/jni/Android.mk"
18    * You should also set "NDK_MODULE_PATH" to point to the base norm directory
19      so that the NDK can find protolib.  See the example.
20
21   Example:
22
23    LOCAL_PATH := $(call my-dir)
24
25    APP_MODULES := mil_navy_nrl_norm
26    APP_ABI := all
27    APP_BUILD_SCRIPT := $(LOCAL_PATH)/../library/norm/makefiles/android/jni/Android.mk
28
29    NDK_MODULE_PATH := $(LOCAL_PATH)../library/norm/
30
313. Reference the NORM Android library project in your "project.properties"
32   file.  Add the following:
33
34    android.library.reference.1=/path/to/norm/makefiles/android
35
36Now, you should be able to run "ndk-build" in your root project directory to
37build the shared libraries, and run "ant debug" to build your APK.
38
39Using NORM in your C/C++/Java Android Application
40-------------------------------------------------
41
421. Add a "jni/Application.mk" with your C/C++ code specified.
43
442. Reference the NORM Android project as an NDK Import Module.  See
45   "IMPORT-MODULE.html" in the NDK docs.
46
47   Put something like the following at the bottom of your "Android.mk"
48
49    $(call import-module,norm/makefiles/android/jni)
50
51   This is relative to the "NDK_MODULE_PATH" variable that must be defined in
52   "Application.mk".
53