You are not missing, you have an extra ;-)
Syntax for LOCAL_C_INCLUDES
does not expect these commas. You simply list all directories. Actually, you can use LOCAL_EXPORT_C_INCLUDES
instead (your post hints that you probably tried):
LOCAL_C_INCLUDES := $(LOCAL_PATH)/taglibroot/taglib\
$(LOCAL_PATH)/taglibroot/taglib/ape\
$(LOCAL_PATH)/taglibroot/taglib/asf\
$(LOCAL_PATH)/taglibroot/taglib/flac\
$(LOCAL_PATH)/taglibroot/taglib/it\
$(LOCAL_PATH)/taglibroot/taglib/mod\
$(LOCAL_PATH)/taglibroot/taglib/mp4\
$(LOCAL_PATH)/taglibroot/taglib/mpc\
$(LOCAL_PATH)/taglibroot/taglib/mpeg\
$(LOCAL_PATH)/taglibroot/taglib/mpeg/id3v1\
$(LOCAL_PATH)/taglibroot/taglib/mpeg/id3v2\
$(LOCAL_PATH)/taglibroot/taglib/mpeg/id3v2/frames\
$(LOCAL_PATH)/taglibroot/taglib/ogg\
$(LOCAL_PATH)/taglibroot/taglib/ogg/flac\
$(LOCAL_PATH)/taglibroot/taglib/ogg/opus\
$(LOCAL_PATH)/taglibroot/taglib/ogg/speex\
$(LOCAL_PATH)/taglibroot/taglib/ogg/vorbis\
$(LOCAL_PATH)/taglibroot/taglib/riff\
$(LOCAL_PATH)/taglibroot/taglib/riff/aiff\
$(LOCAL_PATH)/taglibroot/taglib/riff/wav\
$(LOCAL_PATH)/taglibroot/taglib/s3m\
$(LOCAL_PATH)/taglibroot/taglib/toolkit\
$(LOCAL_PATH)/taglibroot/taglib/trueaudio\
$(LOCAL_PATH)/taglibroot/taglib/wavpack\
$(LOCAL_PATH)/taglibroot/taglib/xm
Note If you encounter strange issues with ndk-build
in the future, first advice is to run ndk-build V=1
: it will log all actual compilation commands used by ndk-build
, which may often expose the errors or typos in various Android.mk
files.
PS Your build will finally fail. When you build taglib, you need also to compile all .cpp files in taglibroot
subdirectories! I suggest that you try to build the library the way it was designed to be built, with CMake. The Android patches can be found here: https://code.google.com/p/android-cmake.
You can also try a straightforward approach, but I am not sure it will work:
MY_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := taglib_module
LOCAL_PATH := $(MY_PATH)/taglibroot/taglib
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)\
$(LOCAL_PATH)/ape\
$(LOCAL_PATH)/asf\
$(LOCAL_PATH)/flac\
$(LOCAL_PATH)/it\
$(LOCAL_PATH)/mod\
$(LOCAL_PATH)/mp4\
$(LOCAL_PATH)/mpc\
$(LOCAL_PATH)/mpeg\
$(LOCAL_PATH)/mpeg/id3v1\
$(LOCAL_PATH)/mpeg/id3v2\
$(LOCAL_PATH)/mpeg/id3v2/frames\
$(LOCAL_PATH)/ogg\
$(LOCAL_PATH)/ogg/flac\
$(LOCAL_PATH)/ogg/opus\
$(LOCAL_PATH)/ogg/speex\
$(LOCAL_PATH)/ogg/vorbis\
$(LOCAL_PATH)/riff\
$(LOCAL_PATH)/riff/aiff\
$(LOCAL_PATH)/riff/wav\
$(LOCAL_PATH)/s3m\
$(LOCAL_PATH)/toolkit\
$(LOCAL_PATH)/trueaudio\
$(LOCAL_PATH)/wavpack\
$(LOCAL_PATH)/xm
FILE_LIST := $(foreach dir, $(LOCAL_EXPORT_C_INCLUDES), $(wildcard $(dir)/*.cpp))
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
LOCAL_EXPORT_CFLAGS := -DFOO=1
LOCAL_EXPORT_LDLIBS := -llog
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_PATH := $(MY_PATH)
LOCAL_MODULE := my_own_shared_lib
LOCAL_SHARED_LIBRARIES := taglib_module
LOCAL_SRC_FILES := tag_lib_personal.cpp
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)
Please note that in your Java, you will load the two libraries, and order is important:
Runtime.loadLibrary("taglib_module");
Runtime.loadLibrary("my_own_shared_lib");