Reputation: 74497
I'm having trouble refactoring some make files into manageable modules.
Following is the structure I try to accomplish:
Note: I started from the Vuforia SDK ImageTargets example and added some other libraries like reading OBJ, PNG and ZIP files. I've also included the freetype and ftgles library.
I call the other make files from my the root Android.mk file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include jni/libobj/Android.mk
include jni/libpng/Android.mk
include jni/libzip/Android.mk
include jni/freetype/Android.mk
include jni/ftgles/Android.mk
include jni/qcar/Android.mk
include jni/imagetargets/Android.mk
You can see all make files in a gist on github.
The compiler gives following error:
Install : libFTGLES.so => libs/armeabi/libFTGLES.so Compile++ arm : ImageTargets <= ImageTargets.cpp jni/imagetargets/ImageTargets.cpp:44:24: fatal error: libpng/png.h: No such file or directory compilation terminated. make: * [obj/local/armeabi/objs/ImageTargets/ImageTargets.o] Error 1
Any idea how to make the libpng (and other modules) headers available for the imagetargets module?
Upvotes: 0
Views: 340
Reputation: 4941
I think that specifying the path to the includes in each sub-makefile using LOCAL_EXPORT_C_INCLUDES
would ensure that the headers are available when building the final module.
Check the documentation for this flag in the NDK documentation (available in your NDK directory), but from what I understand, it will do exactly what you're trying to do: automatically export the include path of each sub-module to the final module.
Upvotes: 1