[PATCH] Android: error on static lib build, if relative NDK_MODULE_PATH used

Hello,

if the variable NDK_MODULE_PATH is set to a relative path (like “…/”),
compiling of a static SDL lib fails with an error similar to this:
make: *** No rule to make target
..//android_libs/SDL/..//android_libs/SDL/src/main/android/SDL_android_main.c', needed byobj/local/armeabi/objs/SDL2_static/__//android_libs/SDL/src/main/android/SDL_android_main.o’.
Stop.

Regarding the shared lib, this is already prevented by a “subst” command
in the /Android.mk, which removes all occurences of “$(LOCAL_PATH)/”.
The attached patch does the same with the additional
"SDL_android_main.c", which is included for build the static SDL lib.

Regards,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl_static_lib_NDK_MODULE_PATH.patch
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140611/f978d332/attachment.bin

Your patch is in, thanks!
https://hg.libsdl.org/SDL/rev/81198d739376On Wed, Jun 11, 2014 at 5:06 AM, Stefan P?schel <stefan.poeschel at gmx.de> wrote:

Hello,

if the variable NDK_MODULE_PATH is set to a relative path (like “…/”),
compiling of a static SDL lib fails with an error similar to this:
make: *** No rule to make target

`…//android_libs/SDL/…//android_libs/SDL/src/main/android/SDL_android_main.c’,
needed by

`obj/local/armeabi/objs/SDL2_static/__//android_libs/SDL/src/main/android/SDL_android_main.o’.
Stop.

Regarding the shared lib, this is already prevented by a “subst” command
in the /Android.mk, which removes all occurences of “$(LOCAL_PATH)/”.
The attached patch does the same with the additional
"SDL_android_main.c", which is included for build the static SDL lib.

Regards,
Stefan


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org