I am unable to locate a working example of the Android NDK's module importation feature. The following Android.mk files seem correct, and the inner module builds and executes without error. However, building the outer module fails with the following error messages:
Android NDK: jni/inner/Android.mk:inner: LOCAL_MODULE_FILENAME should not include file extensions
Android NDK: jni/inner/Android.mk:inner: LOCAL_MODULE_FILENAME must not contain a file extension
/home/caleb/dev/android-ndk-r8e/build/core/build-shared-library.mk:30: * Android NDK: Aborting . Stop.
The inner, contained Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := inner
LOCAL_MODULE_FILENAME := libinner
LOCAL_SRC_FILES := inner-module.c
include $(BUILD_SHARED_LIBRARY)
The outer, containing Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := outer
$(call import-module,inner)
LOCAL_SHARED_LIBRARIES += inner
include $(BUILD_SHARED_LIBRARY)