Ah ok I didn't realise they don't have to be in dependency order. Any
On May 24, 11:05 pm, David Turner <di...@android.com> wrote:
> Generally speaking, try including other sub-makefiles after module
> definitions in your own module.
> Or, simply re-assign the LOCAL_PATH value as you did in your fix.
idea why the all-subdir-makefiles function doesn't seem to work?
Thanks for the quick reply!
Tim
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Anyway, it all works (except the sub-dirs thing) if you do it like
this:
--------------------8<-------------
# Build game library as shared library.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/stlport/stlport \
$(LOCAL_PATH)/freetype/include
LOCAL_SRC_FILES := ...
LOCAL_STATIC_LIBRARIES := ft2 stlport
LOCAL_LDLIBS := -lGLESv1_CM
LOCAL_CPPFLAGS := -DANDROID_NDK
include $(BUILD_SHARED_LIBRARY)
# Build freetype and stlport as static libraries.
include freetype/Android.mk
include stlport/Android.mk
---------->8-----------------
I really really think you should add some more documentation about
what the hell is going on here! (Or at least include an example like
this one. Surely it is a very common use case - the current twolibs
example puts all the source files in the same directory which I'm
pretty sure no-one would do in practice).
Tim
What we really need is a repository of prebuilt libraries like freetype and friends for Android.
Actually that part was really really easy. It's just the build system
that needs fixing or documenting.
Another issue I've found is that in order to regenerate the APK after
building the library I have to clean the project. However this deletes
all the intermediate object files so when I go to rebuild the jni
library it has to rebuild it all. That is, I do something like this:
1. Alter source files.
2. ndk-build
3. Try running the project in eclipse - it doesn't notice the library
has changed and uses an old apk.
4. Clean the project.
5. Run it, now it rebuilds the apk with the new library.
6. Alter the source files some more.
7. ndk-build - at this point I expect it to do an incremental build
but it actually recompiles every file.
On May 26, 11:27 pm, Doug Schaefer <cdtd...@gmail.com> wrote:Actually that part was really really easy. It's just the build system
> What we really need is a repository of prebuilt libraries like freetype and
> friends for Android.
that needs fixing or documenting.